Project

General

Profile

Bug #3414

Updated by Davide Pesavento almost 9 years ago

Because a copy constructor in the form `T(T)` or `T(const T&)` will also bind to an rvalue argument, thus satisfying `is_move_constructible<T>` without requiring the existence of a move constructor `T(T&&)`. 

 Obviously the same applies to the `_trivially_` and `_nothrow_` variants, and a similar limitation applies to `is_move_assignable` (doesn't guarantee that the type has a move assignment operator) and to its variants. 

 In ndn-cxx we currently use these type traits paired with `static_assert` in `Block` and `Buffer`, but as explained above this is not sufficient to ensure that they have a are move constructor or a move assignment operator. constructible and assignable.

Back