diff --git a/src/lib/meta/trait.hpp b/src/lib/meta/trait.hpp index 49e0ebd76..e9920f9c1 100644 --- a/src/lib/meta/trait.hpp +++ b/src/lib/meta/trait.hpp @@ -319,6 +319,24 @@ namespace meta { + /** detect smart pointers */ + template + struct is_smart_ptr + : std::false_type + { }; + + template + struct is_smart_ptr> + : std::true_type + { }; + + template + struct is_smart_ptr> + : std::true_type + { }; + + + diff --git a/src/lib/meta/util.hpp b/src/lib/meta/util.hpp index 15735a923..0cdc3db58 100644 --- a/src/lib/meta/util.hpp +++ b/src/lib/meta/util.hpp @@ -52,6 +52,15 @@ namespace std { // forward declaration for std::string... class basic_string; using string = basic_string, allocator>; + + + // forward declarations for common smart ptrs + template + class shared_ptr; + + template + class unique_ptr; + }