[type_traits]: is_movable

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[type_traits]: is_movable

Vaclav Vesely
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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

is_movable.zip (5K) Download Attachment