Replies: 2 comments
-
Hi @T1t4m1un - I agree Btw, another related suggestion came up in #134. I'm willing to consider a PR that maintains C++11 support as well as backward-compatibility. But if it falls outside of that, I think it may be better to fork and create a new project. I don't want |
Beta Was this translation helpful? Give feedback.
-
I will proceed to close this issue for now, as I do have plans to address it. But again as mentioned, a PR would be considered if it fulfills the stated requirements. |
Beta Was this translation helpful? Give feedback.
-
Hello rapidcsv maintainers,
Firstly, thank you for your hard work on this library. I was going through the Converter class and noticed that RTTI (typeid()) is used to determine the type for static conversion. While this approach works, using RTTI can increase the binary size and is generally discouraged unless truly necessary.
Instead, I suggest refactoring this piece of code to leverage C++17's if constexpr for compile-time checks or using type traits. This would ensure that only the necessary branch of code is compiled for a particular type, resulting in more optimized binary code.
Here's an example of what it might look like using if constexpr:
Or considering to support lower version C++, SFINAE techniques can be used to replace
if constexpr
statement like this:Beta Was this translation helpful? Give feedback.
All reactions