• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
22 #pragma GCC diagnostic push
23 #pragma GCC diagnostic ignored "-Wunused-result"
24 #endif
25 
26 //empty
27 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME empty
28 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_container_detail {
29 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END   }}}
30 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 0
31 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
32 #include <boost/intrusive/detail/has_member_function_callable_with.hpp>
33 
34 //size
35 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME size
36 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_container_detail {
37 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END   }}}
38 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 0
39 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
40 #include <boost/intrusive/detail/has_member_function_callable_with.hpp>
41 
42 //#pragma GCC diagnostic ignored "-Wunused-result"
43 #if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
44 #pragma GCC diagnostic pop
45 #endif
46 
47 namespace boost {
48 namespace container {
49 namespace dtl {
50 
51 template <class Container>
52 struct is_container
53 {
54    static const bool value =
55       boost::container::is_container_detail::
56          has_member_function_callable_with_size <const Container>::value &&
57       boost::container::is_container_detail::
58          has_member_function_callable_with_empty<const Container>::value;
59 };
60 
61 template <>
62 struct is_container<void>
63 {
64    static const bool value = false;
65 };
66 
67 
68 }  //namespace dtl {
69 }  //namespace container {
70 }  //namespace boost {
71 
72 #endif   //#ifndef BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP
73