
On 6 October 2010 02:56, Rutger ter Borg <rutger@terborg.net> wrote:
Although [references aren't] the most important case for me, it has its own section in the documentation, and I will probably be using lots of these.
Why? What is the advantage over using a raw pointer?
What also doesn't seem right to me is that, e.g.,
struct A { int a; double b; double c; std::string d; };
struct B { boost::optional< int > a; boost::optional< double > b; boost::optional< double > c; boost::optional< std::string > d; };
What bit pattern can be used for an int which says it hasn't been set? Optional models "the variable is not set." You want something different. Why not just create a different class to model what you want? -- Nevin ":-)" Liber <mailto:nevin@eviloverlord.com> (847) 691-1404