Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::variant construction,assignment
From: Igor R (boost.lists_at_[hidden])
Date: 2008-10-09 15:52:25

> I have chosen to make the private members r_ and v_ as pointers to allow for r_=0 and v_=0
> (is this a "never do this" thing?).

You can also consider using boost::optional<boost::variant> r_, v_;
Then setR() would be just: r_ = rhs;

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at