c++ - boost::is_nothrow_move_constructible implementation -
i'm giving new vs 2015 preview go, , i'm having trouble boost. after tracing problem, don't understand how ever worked on any compiler.
i have unordered_map<k, boost::variant<std::unordered_map<int, std::unique_ptr<t>>>>
. fails compile because boost::variant
apparently tries copy-construct unordered_map
inside it- based on result of boost::is_nothrow_move_constructible
trait, indeed boost::false_type
.
this reveals definition of boost::is_nothrow_move_constructible
template <class t> struct is_nothrow_move_constructible_imp{ boost_static_constant(bool, value =( ::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::has_trivial_move_constructor<t>::value, ::boost::has_nothrow_copy<t>::value >::value, ::boost::type_traits::ice_not< ::boost::is_array<t>::value >::value >::value)); };
er, non-trivial noexcept move constructors, many, many classes have? how can definition function on other compilers?
turns out real confusion here never did work on visual studio. guess must have been optional
, not variant
used move-only types. seems variant
cannot support move-only types on visual studio current version, , memories of working on vs2013 incorrect.
i ended specializing trait types i'm using. hacky functional.
Comments
Post a Comment