|
Boost : |
From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2003-02-24 14:29:56
David Abrahams wrote:
[...]
>> Example:
>> optional<int> i;
>>
>> new (i) int(17);
>
> Which copy ctor are you referring to?
> And why do we want to prevent copy ctor usages?
Because optional<> will be able to handle types without copy constructors
(this was the main purpose of partial<> in fact). I was referring to the
copy constructor of optional<>'s template parameter.
class A
{
A(A const &);
public:
A(int) {}
};
int main()
{
optional<A> o(A(9));
}
Philippe A. Bouchard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk