Boost logo

Boost :

Subject: Re: [boost] [move] problem with msvc-10 (BOOST_MOVABLE_BUT_NOT_COPYABLE)
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2010-11-25 01:33:19


Oliver Kowalke-2 wrote:
>
>
>
> -------- Original-Nachricht --------
> Betreff: [move] problem with msvc-10 (BOOST_MOVABLE_BUT_NOT_COPYABLE)
> Datum: Wed, 24 Nov 2010 20:56:46 +0100
> Von: Oliver Kowalke <oliver.kowalke_at_[hidden]>
> An: boost_at_[hidden]
>
> Hi,
> msvc-10 has some problems with boost.move.
> linker error: LNK2019: unresolved symbol "private __cdecl X::X(class X
> const&)"
>
> Example doc_file_descriptor.cpp (uses BOOST_MOVABLE_BUT_NOT_COPYABLE)
> does not compile too.
>
> g++-4.4.5 accepts the code.
>
> ?
>
> X X::create()
> {
> boost::shared_ptr< impl_t > impl( new impl_t() );
> return X( impl);
> }
>

Shouldn't this function use boost::move?

X X::create()
{
        boost::shared_ptr< impl_t > impl( new impl_t() );
        return boost::move( X( impl) );
}

> int main(int argc, char * argv[])
> {
> X x( X::create() );
> return 0;
> }
>

Shouldn't this declaration use boost::move?

     X x( boost::move(X::create()) );

Or shouldn't X::create returns a rvalue to X?

Best,
Vicente

-- 
View this message in context: http://boost.2283326.n4.nabble.com/move-problem-with-msvc-10-BOOST-MOVABLE-BUT-NOT-COPYABLE-tp3058033p3058493.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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