#include "HasMarshalConstructor.h" namespace MarshalSupport { namespace Internal { //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::vector* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } #ifdef MARSHALSUPPORT_CPP11SUPPORTED //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::array* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } #endif //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::list* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } #ifdef MARSHALSUPPORT_CPP11SUPPORTED //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::forward_list* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } #endif //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::deque* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::set* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::multiset* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } #ifdef MARSHALSUPPORT_CPP11SUPPORTED //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::unordered_set* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::unordered_multiset* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } #endif //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::map* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::multimap* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } #ifdef MARSHALSUPPORT_CPP11SUPPORTED //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::unordered_map* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::unordered_multimap* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } #endif //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::stack* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::queue* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::priority_queue* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::basic_string* elementPointer) { return IsSTLContainerNestedElementMarshallableOrSameSize(expectedSize, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::pair* elementPointer) { return true; } #if defined(MARSHALSUPPORT_CPP11SUPPORTED) && !defined(MARSHALSUPPORT_NOVARIADICTEMPLATES) //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const std::tuple* elementPointer) { return true; } #endif //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR bool IsSTLContainerNestedElementMarshallableOrSameSize(size_t expectedSize, const ElementType* elementPointer) { return (has_marshal_constructor::value || (sizeof(ElementType) == expectedSize)); } } // Close namespace Internal } // Close namespace MarshalSupport