
Sam Partington wrote:
That this discussion is going on so long and is so disputed it seems to me that there is no right-way, and the best way of fixing it is to disallow T& altogether.
That is the direction I am most warming to. T & is does not meet the Copy Constructible requirements of the standard (20.1.3) although const T & comes close. Rather than support it as a special case via rebinding, I am very happy for that special case to be spelled optional< ref< T > > so there is no real loss of functionality, although you need a little more trickery for function templates returning and optional< T > (specialising for the T& case) If simply making the specialization illegal allows us to drop the issue and move forward, that alone makes it worthwhile for me! Optional looks like a great library for TR2, I would hate to see it lose its way in contentious issues. And I doubt the pointer-like interface debate can be so easily swept aside ;?) AlisdairM