Boost logo

Boost :

From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2004-05-26 21:31:58


Allen Yao wrote:

> inline void
> basic_oarchive_impl::save_pointer(
> basic_oarchive & ar,
> const void * t,
> const basic_oserializer_pointer & bos_ptr
> ){
> ...
> ar << class_name_type(key); // This line causes an error message said
> that //
> boost::noncopyable's ctor is
> private. Strange!
> ...
> }

See: http://gcc.gnu.org/bugs.html#cxx_rvalbind which explains the problem. In a
nutshell:
-------------------------------------
struct A : boost::noncopyable {};
void foo(const A& a);

foo(A()); // ill-formed
-------------------------------------
but it used to be accepted, and it is still (wrongly) accepted by many
compilers.

Also I suggest you to have a look at http://gcc.gnu.org/gcc-3.4/changes.html to
see the main changes in GCC 3.4.0 that affects C++ code.

-- 
Giovanni Bajo

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