rttr
rttr copied to clipboard
rttr 0.9.6 compile error
Hi guys, I try to develop using the rttr library. Would you let me know the solution?
- OS : cygwin64
- Order :
-
$cmake . --> I had used the changed command ( "cmake ." ) because the error was invoked error if I use the command ( "cmake -DCMAKE_BUILD_TYPE=Release <Path to RTTR src code>" ) by recommendation of the site (https://www.rttr.org/doc/master/building_install_page.html).
-
$make --> error file ==> src/detail/variant_data_policy.h --> error message ==> ‘new’ of ‘initializer_list’ does not extend the lifetime of the underlying array [-Werror=init-list-lifetime] --> error code ==>
static RTTR_INLINE void clone(const T& value, variant_data& dest)
{
reinterpret_cast<T*&>(dest) = new T(value); // here,, "new T(value)"
}
template\<typename U\>
static RTTR_INLINE void create(U&& value, variant_data& dest)
{
reinterpret_cast<T*&>(dest) = new T(std::forward<U>(value)); // here, "new T(std::forward<U>(value))"
}