> From: Fernando Cacciola [mailto:[EMAIL PROTECTED] > > Mat Marcus <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >
> > Those who answer no to the above question may > > prefer to write code that uniformly handles T and optional<T>. > > > I doubt such uniformity can be implemented smoothly. > > > As you know, my (current) answer is no. There may be a > third group who > > want both. The problem is that I find that the pointer-like > interface > > is distracting, but that may be because I'm unfamiliar with the > > use-cases where you might want to handle T*'s and optional<T>'s > > uniformly or even replace raw pointers with optional<T>'s, since > > pointers also bring allocation issues with them. Instead I > have been > > mainly focused on replacing T's with optional<T>'s. > > Being able to replace T's with optional<T>'s is indeed a > reasonable goal. I did it myself quite a few times. But I > don't see how this can be made as smoothly as you wish though. I use optional<T> quite a bit and am glad T and optional<T> are different. Saves my bacon when I do silly things, especially when something transitions from a T to an optional<T>. Strongly typed maintenance is something I'm thankful for. T* and optional<T> substitutability seems fine to me. Matt. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost