This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
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.
- References:
- [v3] Add constexpr specifiers to std::shared_ptr, std::unique_ptr, etc
- Re: [v3] Add constexpr specifiers to std::shared_ptr, std::unique_ptr, etc
- Re: [v3] Add constexpr specifiers to std::shared_ptr, std::unique_ptr, etc
- Re: [v3] Add constexpr specifiers to std::shared_ptr, std::unique_ptr, etc
- Re: [v3] Add constexpr specifiers to std::shared_ptr, std::unique_ptr, etc
- Re: [v3] Add constexpr specifiers to std::shared_ptr, std::unique_ptr, etc
- Re: [v3] Add constexpr specifiers to std::shared_ptr, std::unique_ptr, etc
- Re: [v3] Add constexpr specifiers to std::shared_ptr, std::unique_ptr, etc
- Re: [v3] Add constexpr specifiers to std::shared_ptr, std::unique_ptr, etc