Boost logo

Boost :

Subject: Re: [boost] boost atomic question
From: Janek Kozicki (janek_listy_at_[hidden])
Date: 2010-04-30 11:07:28


Janek Kozicki said: (by the date of Fri, 30 Apr 2010 17:04:53 +0200)

> What would it take to get this code to work?
>
> std::vector<boost::atomic<Something> > v;
> v.resize(100);

Just for the question to be complete, that's my Something class:

class Something
{
        private:
                int val;
        public:
                Something(){};
                Something(int i):val(i){};
                void set_val(int i) {val=i;};
                int get_val() {return val;};
};

But that 'int' is just a placeholder. This class is intended to be a
bit more complex...

best regards

-- 
Janek Kozicki                               http://janek.kozicki.pl/  |

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