Boost logo

Boost :

Subject: Re: [boost] [context] MinGW support?
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2011-07-23 06:49:31


Am 23.07.2011 11:35, schrieb Nathan Ridge:
>> Hello Nate,
>>
>> please use https://github.com/olk/boost.context - I don't get compiler
>> errors with this source for 32bit/64bit Linux on x86.
>>
>> The errors above point to some problems with boost.move. Which version
>> did you use? Could you test the lib with the sources from github?
> I tried the github sources, but I am getting the same errors.
>
> I am using the latest SVN trunk, which contains the Move library.
> Is there some other version of the Move library that I'm supposed to be
> using?
>
> Thanks,
> Nate
> _______________________________________________
> Unsubscribe& other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>

It is a bug in the boost.move (trunk version). The new version doesn't allow
to separate the implemantion of copy-ctor and assignment-op from
their declaration.

For instance if you modify the examples of boost.move like movable.hpp to:

class movable
{
BOOST_MOVABLE_BUT_NOT_COPYABLE(movable)
int value_;

public:
movable() : value_(1){}

// only declaration
movable(BOOST_RV_REF(movable) m);
movable & operator=(BOOST_RV_REF(movable) m);

bool moved() const //Observer
{ return value_ == 0; }
};

movable::movable(BOOST_RV_REF(movable) m)
{ value_ = m.value_; m.value_ = 0; }

movable & movable::operator=(BOOST_RV_REF(movable) m)
{ value_ = m.value_; m.value_ = 0; return *this; }

it won't compile for gcc 4.5.2 :

movable.hpp:36:1: error: prototype for
‘movable::movable(boost::rv<movable>&)’ does not match any in class
‘movable’
movable.hpp:28:4: error: candidates are:
movable::movable(boost::rv<movable>&)
movable.hpp:25:4: error: movable::movable()
movable.hpp:21:4: error: movable::movable(movable&)
movable.hpp:39:11: error: prototype for ‘movable&
movable::operator=(boost::rv<movable>&)’ does not match any in class
‘movable’
movable.hpp:30:14: error: candidates are: movable&
movable::operator=(boost::rv<movable>&)
movable.hpp:21:4: error: movable& movable::operator=(movable&)

So I believe I've nothing to fix in boost.context - do you agree?

regards,
Oliver


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