[v3] Add constexpr specifiers to std::shared_ptr, std::unique_ptr, etc

Paolo Carlini paolo.carlini@oracle.com
Tue Nov 9 17:33:00 GMT 2010


On 11/09/2010 06:25 PM, Benjamin Kosnik wrote:
>> To be clear: those tests were obviously incorrect, because unique_ptr
>> and shared_ptr are not literal types.
>>     
> Agreed that unique_ptr and shared_ptr are not literal types.
>
> However, those cons/constexpr.cc tests aren't testing if they are
> literal types... I don't see how these tests were obviously incorrect.
> Can you explain this to me please?
>
> Shouldn't 
>
> constexpr std::unique_ptr<int> a;
>
> work now, if indeed constexpr constexpr() is implemented?
>   
Try it! (or alternately dig out our exchange with Jason ;)

Paolo.



More information about the Libstdc++ mailing list