namespace MarshalSupport { namespace Internal { //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::vector* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } #ifdef MARSHALSUPPORT_CPP11SUPPORTED //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::array* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } #endif //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::list* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } #ifdef MARSHALSUPPORT_CPP11SUPPORTED //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::forward_list* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } #endif //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::deque* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::set* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::multiset* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } #ifdef MARSHALSUPPORT_CPP11SUPPORTED //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::unordered_set* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::unordered_multiset* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } #endif //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::map* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::multimap* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } #ifdef MARSHALSUPPORT_CPP11SUPPORTED //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::unordered_map* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::unordered_multimap* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } #endif //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::stack* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::queue* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::priority_queue* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::basic_string* elementPointer) { return CalculateSTLContainerNestingDepth(currentNestingDepth+1, (const ElementType*)0); } //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::pair* elementPointer) { return currentNestingDepth+2; } #if defined(MARSHALSUPPORT_CPP11SUPPORTED) && !defined(MARSHALSUPPORT_NOVARIADICTEMPLATES) //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const std::tuple* elementPointer) { return currentNestingDepth+std::tuple_size>::value; } #endif //---------------------------------------------------------------------------------------------------------------------- template MARSHALSUPPORT_CONSTEXPR size_t CalculateSTLContainerNestingDepth(size_t currentNestingDepth, const ElementType* elementPointer) { return currentNestingDepth; } } // Close namespace Internal } // Close namespace MarshalSupport