This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]