|
Boost-Commit : |
From: nesotto_at_[hidden]
Date: 2007-11-29 09:33:30
Author: nesotto
Date: 2007-11-29 09:33:29 EST (Thu, 29 Nov 2007)
New Revision: 41460
URL: http://svn.boost.org/trac/boost/changeset/41460
Log:
added comment to warn about typical compile-error
Text files modified:
trunk/boost/ptr_container/clone_allocator.hpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
Modified: trunk/boost/ptr_container/clone_allocator.hpp
==============================================================================
--- trunk/boost/ptr_container/clone_allocator.hpp (original)
+++ trunk/boost/ptr_container/clone_allocator.hpp 2007-11-29 09:33:29 EST (Thu, 29 Nov 2007)
@@ -25,6 +25,12 @@
template< class T >
inline T* new_clone( const T& r )
{
+ //
+ // @remark: if you get a compile-error here,
+ // it is most likely because you did not
+ // define new_clone( const T& ) in the namespace
+ // of T.
+ //
T* res = new T( r );
BOOST_ASSERT( typeid(r) == typeid(*res) &&
"Default new_clone() sliced object!" );
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk