You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our project we wanted to extend variant_basic_types so variants could hold larger objects (like 4 component float vectors) without heap allocations. The problem we encountered is that adding template types to the type_list does not work. I am not sure if there is a bug in the compiler or the rttr code, but using Visual Studio 2022 I observe following behaviour:
// I am using std::string_view as an example, but other types declared as templates or typedefed templates trigger the bug too
#include <string_view>
using namespace rttr;
using type_list_with_string_view = detail::type_list<std::string_view>;
// following static_assert won't compile
static_assert(detail::max_sizeof_list<type_list_with_string_view>::value == sizeof(std::string_view), "should equal");
The value that compiler produces is 1, which makes me think this might be an compiler issue. The same thing happens if you add std::string view (and others) to the variant_basic_types, suddenly the max_sizeof_list::value produces 1. Thanks!
The text was updated successfully, but these errors were encountered:
In our project we wanted to extend variant_basic_types so variants could hold larger objects (like 4 component float vectors) without heap allocations. The problem we encountered is that adding template types to the type_list does not work. I am not sure if there is a bug in the compiler or the rttr code, but using Visual Studio 2022 I observe following behaviour:
The value that compiler produces is 1, which makes me think this might be an compiler issue. The same thing happens if you add std::string view (and others) to the variant_basic_types, suddenly the max_sizeof_list::value produces 1. Thanks!
The text was updated successfully, but these errors were encountered: