Boost logo

Boost :

Subject: [boost] [ptr_container] new_clone overload
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2009-07-30 10:50:18


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've noticed that ptr_container/clone_allocator.hpp contains an undocumented
overload of new_clone that accepts a pointer-to-const:

template< class T >
inline T* new_clone( const T* r );

It is annoying because it doesn't support a pointer-to-non-const argument,
resulting in a compile error if you try. Any chance one of the following
could be done?

1) remove it

2) add a pointer-to-non-const overload

3) change it to
template< class T >
T* new_clone( T* r );

4) or if you care about always returning a pointer-to-non-const change it to
template< class T >
typename remove_const<T>::type * new_clone( T* r );

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkpxsyoACgkQ5vihyNWuA4WnCACgwzxlNxG8z8NAln6Ra8+fNHsn
Yr8AoL5a8Bdvkoya1p99GcS1W8N2WSjk
=rSZQ
-----END PGP SIGNATURE-----


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk