1 ////////////////////////////////////////////////////////////////////////////// 2 // 3 // (C) Copyright Ion Gaztanaga 2017-2017. Distributed under the Boost 4 // Software License, Version 1.0. (See accompanying file 5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 // 7 // See http://www.boost.org/libs/container for documentation. 8 // 9 ////////////////////////////////////////////////////////////////////////////// 10 #ifndef BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP 11 #define BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP 12 13 #ifndef BOOST_CONFIG_HPP 14 # include <boost/config.hpp> 15 #endif 16 17 #if defined(BOOST_HAS_PRAGMA_ONCE) 18 # pragma once 19 #endif 20 21 //empty 22 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME empty 23 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_container_detail { 24 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} 25 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 0 26 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0 27 #include <boost/intrusive/detail/has_member_function_callable_with.hpp> 28 29 //size 30 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME size 31 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_container_detail { 32 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} 33 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 0 34 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0 35 #include <boost/intrusive/detail/has_member_function_callable_with.hpp> 36 37 namespace boost { 38 namespace container { 39 namespace dtl { 40 41 template <class Container> 42 struct is_container 43 { 44 static const bool value = 45 boost::container::is_container_detail:: 46 has_member_function_callable_with_size <const Container>::value && 47 boost::container::is_container_detail:: 48 has_member_function_callable_with_empty<const Container>::value; 49 }; 50 51 template <> 52 struct is_container<void> 53 { 54 static const bool value = false; 55 }; 56 57 58 } //namespace dtl { 59 } //namespace container { 60 } //namespace boost { 61 62 #endif //#ifndef BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP 63