#ifndef __ISLASTNESTEDCONTAINERELEMENT_H__ #define __ISLASTNESTEDCONTAINERELEMENT_H__ #include "MarshalPreprocessorMacros.h" #include #include #include #include #include #include #include #include #include #ifdef MARSHALSUPPORT_CPP11SUPPORTED #include #include #include #include #include #include #endif namespace MarshalSupport { namespace Internal { template struct is_last_nested_container_element { private: // Typedefs typedef char(&yes)[1]; typedef char(&no)[2]; private: // Check function template static no check(std::vector*); #ifdef MARSHALSUPPORT_CPP11SUPPORTED template static no check(std::array*); #endif template static no check(std::list*); #ifdef MARSHALSUPPORT_CPP11SUPPORTED template static no check(std::forward_list*); #endif template static no check(std::deque*); template static no check(std::set*); template static no check(std::multiset*); #ifdef MARSHALSUPPORT_CPP11SUPPORTED template static no check(std::unordered_set*); template static no check(std::unordered_multiset*); #endif template static no check(std::map*); template static no check(std::multimap*); #ifdef MARSHALSUPPORT_CPP11SUPPORTED template static no check(std::unordered_map*); template static no check(std::unordered_multimap*); #endif template static no check(std::stack*); template static no check(std::queue*); template static no check(std::priority_queue*); template static no check(std::basic_string*); template static no check(std::pair*); #if defined(MARSHALSUPPORT_CPP11SUPPORTED) && !defined(MARSHALSUPPORT_NOVARIADICTEMPLATES) template static no check(std::tuple*); #endif #ifdef MARSHALSUPPORT_CPP11SUPPORTED template static no check(std::unique_ptr*); #endif template static yes check(ElementType*); public: // Result static const bool value = (sizeof(check((T*)0)) == sizeof(yes)); }; } // Close namespace Internal } // Close namespace MarshalSupport #endif