Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost Shared Memory Compilation Issue
From: TONGARI (tongari95_at_[hidden])
Date: 2011-07-27 08:43:26


2011/7/27 Nathan Lewis <nathanlewissubscription_at_[hidden]>

> TONGARI <tongari95 <at> gmail.com> writes:
>
> >
> >
> I hate to continue this, I've been working with this a bit more and am
> running
> into another compilation issue that is vague to me. I am now trying to put
> the
> object Complex_Data into a vector in shared memory below and it is
> complaining
> about the following:
> error C2679: binary '=' : no operator found which takes a right-hand
> operand of
> type 'const complex_data' (or there is no acceptable conversion)
> 1> c:\code\test.cpp(113):
>
> Line 133 is the end of the complex data class (closing bracket) It seems
> that it
> is expecting the class to have an assignment operator or copy constructor,
> I am
> not sure. I appreciate any help you might have. I am kind of trying to
> follow
> the container of container example but instead using a vector.
>

Define your
complex_data& operator=(complex_data const& other)

I have no idea why compiler cannot generate this assignment operator which
accepts const&, maybe it's because of the move emulation used by
interprocess containers?



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net