The cut-in for C++03 and C++11 finished today. All the major compilers are
supported. It also supports GNU's libstdc++ and LLVM's libc++ on OS X. I
have not tested with MacPorts (I don't have a Ports compiler installed),
but I believe it will work there also.
OS X was a difficult platform because it advertised C++11 support
(__cplusplus == 201103), but it lacked unique_ptr. We needed unique_ptr due
to auto_ptr deprecation. Jonathan Wakely, one of the GCC C++ maintainers,
helped craft the following test (from smartptr.h):
if (__cplusplus >= 201103L) || (_MSC_VER >= 1600)
# if defined(__clang__)
# if (__has_include(<forward_list>))
# define CRYPTOPP_HAVE_UNIQUE_PTR 1
# endif
# else
# define CRYPTOPP_HAVE_UNIQUE_PTR 1
# endif
#endif
// The result of below is a CryptoPP::auto_ptr in both cases
#ifdef CRYPTOPP_HAVE_UNIQUE_PTR
template<typename T>
using auto_ptr = std::unique_ptr<T>;
#else
using std::auto_ptr;
#endif
It was clever because he choose a feature that was added after Apple's
version of the library (forward_list), which provided the test we needed,
and coupled that with Clang's `__has_include` feature test. If Apple ever
provides forward_list, then unique_ptr will certainly be available.
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.