Boost logo

Boost :

Subject: Re: [boost] [system][filesystem v3] A possible error_code argument compromise
From: Scott McMurray ([hidden])
Date: 2009-10-27 10:45:38

2009/10/27 Stefan Strasser <strasser_at_[hidden]>:
> boost::optional<error_code&>?
> optional does have implicit conversion and the rest of your public interface.

Ah, good. I hoped it did, but I got confused by the Optional
References page in the docs.

> optional<T &> is implemented as a container of T & plus a bool though, but I
> see no reason not to create a boost::optional specialization that implements
> optional<T &> by holding a pointer that's exposed as a reference in the
> interface.

Which I suppose brings us right back to the question of whether null
references are legal, since that (worthwhile) optimization is only
valid if they're illegal.

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