[type_traits]: is_movable

This is a duplicate. I sent this to the wrong thread by mistake. I'm sorry. Hi, draft of the is_movable trait is attached. Notes: - Implicit implementation is based on the has_trivial_copy trait. - For STL configurations, which defines BOOST_HAS_MOVABLE_STL, is_movable.hpp declares STL containers (and their const versions) as movable. Partial template specialization is required (!defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)). Open issues: - I'm not sure with volatiles. has_trivial_copy declares volatile types explicitly as not has_trivial_copy. I don't know why but is_movable should probably follow this. - I have tested with MSVC (6, 7.1 and 8) and GCC (3.2.3 - MinGW) compilers. MSVC is fine but GCC complains with specializations for STL types. It seems to be related to a different macro expansion strategy of preprocessor. I'm not able to use BOOST_PP_COMMA macro correctly. I will appreciate any help. Regards, Vaclav
participants (1)
-
Vaclav Vesely