is_contiguous_container.hpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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_CONTIGUOUS_CONTAINER_HPP
  11. #define BOOST_CONTAINER_DETAIL_IS_CONTIGUOUS_CONTAINER_HPP
  12. #ifndef BOOST_CONFIG_HPP
  13. # include <boost/config.hpp>
  14. #endif
  15. #if defined(BOOST_HAS_PRAGMA_ONCE)
  16. # pragma once
  17. #endif
  18. //data
  19. #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME data
  20. #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_contiguous_container_detail {
  21. #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
  22. #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 0
  23. #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
  24. #include <boost/intrusive/detail/has_member_function_callable_with.hpp>
  25. namespace boost {
  26. namespace container {
  27. namespace dtl {
  28. template <class Container>
  29. struct is_contiguous_container
  30. {
  31. static const bool value =
  32. boost::container::is_contiguous_container_detail::
  33. has_member_function_callable_with_data<Container>::value &&
  34. boost::container::is_contiguous_container_detail::
  35. has_member_function_callable_with_data<const Container>::value;
  36. };
  37. } //namespace dtl {
  38. } //namespace container {
  39. } //namespace boost {
  40. #endif //#ifndef BOOST_CONTAINER_DETAIL_IS_CONTIGUOUS_CONTAINER_HPP