diff options
author | Vincent Richard <[email protected]> | 2013-12-28 13:06:49 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-12-28 13:06:49 +0000 |
commit | f4a9402c649fc213fb850f9cc8a0c89fc027f0d6 (patch) | |
tree | 7b917c65f5476906705f77249a13fda0c46bd96d | |
parent | Better error handling. Fixed return values in custom BIO. Added support for S... (diff) | |
download | vmime-f4a9402c649fc213fb850f9cc8a0c89fc027f0d6.tar.gz vmime-f4a9402c649fc213fb850f9cc8a0c89fc027f0d6.zip |
Added define for minimal compatibility with legacy smart pointers.
-rw-r--r-- | vmime/types.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vmime/types.hpp b/vmime/types.hpp index 034330bc..12e5bf71 100644 --- a/vmime/types.hpp +++ b/vmime/types.hpp @@ -30,6 +30,7 @@ #include <vector> #include <stdexcept> #include <cstddef> +#include <utility> #include "vmime/config.hpp" @@ -95,6 +96,16 @@ namespace vmime // For compatibility with versions <= 0.7.1 (deprecated) namespace net { } namespace messaging = net; + + // For (minimal) compatibility with legacy smart pointers (<= 0.9.1) + // Your compiler must have support for C++11 +#if VMIME_COMPAT_LEGACY_SMART_POINTERS + template <typename T> using ref = shared_ptr <T>; + class creator {}; // unused + template <typename T, typename... Args> + inline shared_ptr <T> create(Args&&... args) { return make_shared <T>(args...); } +#endif + } |