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 " ) 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(value)); // here, "new T(std::forward(value))"
}
Hi guys, I try to develop using the rttr library. Would you let me know the solution?
$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(value)); // here, "new T(std::forward(value))" }