ArduinoSTL icon indicating copy to clipboard operation
ArduinoSTL copied to clipboard

Implement std::is_integral

Open ademuri opened this issue 5 years ago • 2 comments

I tested that this compiles for Arduino UNO, including vectors with integral and non-integral types.

ademuri avatar Feb 08 '20 18:02 ademuri

Hello! Thank you!

I'm concerned that this takes away the is_integer templates from C++11 without compiler checks. Should we make sure that if you're using C++11 that the old code is still there?

mike-matera avatar Jan 03 '22 19:01 mike-matera

@mike-matera What's your take on adding new (C++11) features to this library? In previous incarnations of this library, I think there was a tendency to stick to uclibc++ as much as possible and only make Arduino-specific changes. One downside of adding new C++11 features is that the available features become more fragmented, with some of them supported but not all of them, making it also harder for another library to add C++11 features (i.e. risk of duplication).

One example of such a library is https://github.com/hideakitai/ArxTypeTraits, which was originally intended to add just the C++11 <type_traits> library, but has since been extended to provide a lot of C++11 (and beyond) features on top of a C++98 libstdc++. A few years ago, I contributed some changes to that library so it would work together with ArduinoSTL, so maybe you could consider referring to that library for missing C++11 features instead of adding them here? The function implemented by this particular PR (std::is_integral) is already provided by that library, for example.

matthijskooijman avatar Jun 29 '22 15:06 matthijskooijman