On Monday, July 27, 2015 at 5:10:05 PM UTC-4, Jeffrey Walton wrote:
>
>
>
> On Monday, July 27, 2015 at 5:04:35 PM UTC-4, ruben.de.smet wrote:
>>
>> I would rather call the used class unique_ptr and revert to auto_ptr,
>> instead of calling it auto_ptr when in fact it will be a unique_ptr in the
>> future. It will avoid confusion for people fiddeling with the code, because
>> people will think they can pass them around at will when they in fact
>> can't.
>>
>> Other than that, going towards C++11: I like it!
>>
>
> OK, good idea.
>
> I'll get tit cut-over like that shortly.
>
My bad... that's wont work. This unique_ptr and this only works in C++11:
template<typename T>
using auto_ptr = std::unique_ptr<T>;
How about something like:
template <typename T> struct local_ptr {
#if defined(CTYPTOPP_CXX11)
typedef std::unique_ptr<T> ptr;
#else
typedef std::auto_ptr<T> ptr;
#endif};
Jeff
--
--
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.