Boost logo

Boost :

From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2002-11-22 14:52:33

----- Original Message -----
From: "Vincent Finn" <vincent_finn_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, November 22, 2002 1:38 PM
Subject: [boost] Re: Formal Review Request: class optional<>

> And now the question
> can this be used with VC6 ?
Yes :-))
I've uploaded the new version which compiles and runs properly with VC6.0

NOTE: I've found when running the test that VC6.0 creates a temporary copy
in the following situation:

void foo()
  MyStruct v = 2;
  optional<MyStruct> opt(v);
  (*opt == v ) ; // A temporary copy of the value inside 'opt' is created

The weird thing is that (*opt) is a proxy with a 'operator T const&() const'
and this operator *is* called -as can be seen with the debugger- but only to
create the temporary that is passed to operator ==

Anyway, with a small twist of the test it now passes with VC6.0

Fernando Cacciola

Boost list run by bdawes at, gregod at, cpdaniel at, john at