Bypass memcpy for unsuitable scalar types (aka make a better use of C++11 type-traits)
@ggael
Submitted by Gael GuennebaudAssigned to Nobody
Link to original bugzilla bug (#1432)
Version: 3.3 (current stable)
Description
See:
basically some types like std::string might not be copiable by memcpy if too short. The proposed fix is to use c++11 type-traits to detect this and bypass memcpy (in Memory.h) in such cases. In c++98, we would document it a known pitfall.
In the same vein, NumTraits::RequireInitialization currently default to:
RequireInitialization = internal::is_arithmetic<T>::value ? 0 : 1
whereas c++11 provides more accurate type-traits for that.
Blocking
Edited by Eigen Bugzilla