
28 May
2010
28 May
'10
1:42 p.m.
Ilya Sokolov wrote:
Could BOOST_MOVABLE_BUT_NOT_COPYABLE be changed into CRTP base class? It would prevent such errors at compile time. Also, it is quite similar to boost::noncopyable.
It seems my answer to Oliver wasn't clear enough. This is not a problem of Boost.Move, but a simple programmer error in "X X::create()" that would have a significant performance penalty even if the compiler/linker would accept the code. However, a CRTP class might be used to convert between the optimized mode with unhappy assignment operator signature and the non-optimized mode. Regards, Thomas