|
Boost : |
Subject: [boost] [move] problem with msvc and BOOST_MOVABLE_BUT_NOT_COPYABLE
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2010-05-27 15:12:15
I get an linker error (private: __thiscall X::X(class X &) is unresolved symbol) with msvc-9.0 on XP.
AFAIL (docu) implementing the copy-ctor isn't required and passing values from static memeber functions are allowed.
What's wrong?
Oliver
#include "stdafx.h"
#include <boost/move/move.hpp>
class X
{
private:
BOOST_MOVABLE_BUT_NOT_COPYABLE( X);
public:
X();
static X create();
X( BOOST_RV_REF( X) other);
X & operator=( BOOST_RV_REF( X) other);
};
X::X() {}
X X::create()
{
X x;
return x; // passing value form static memeber-fn
}
X::X( BOOST_RV_REF( X) other) {}
X & X::operator=( BOOST_RV_REF( X) other)
{ return * this; }
int _tmain(int argc, _TCHAR* argv[])
{
X x( X::create() );
return 0;
}
-- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk