deque.hpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright (C) 2013 Vicente J. Botet Escriba
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. //
  6. // 2013/10 Vicente J. Botet Escriba
  7. // Creation.
  8. #ifndef BOOST_CSBL_DEQUE_HPP
  9. #define BOOST_CSBL_DEQUE_HPP
  10. #include <boost/config.hpp>
  11. // MSVC has some trouble instantiating a non_copyable type
  12. //C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\xmemory0(606) : error C2248: 'non_copyable::non_copyable' : cannot access private member declared in class 'non_copyable'
  13. // ..\libs\thread\test\sync\mutual_exclusion\queue_views\single_thread_pass.cpp(24) : see declaration of 'non_copyable::non_copyable'
  14. // ..\libs\thread\test\sync\mutual_exclusion\queue_views\single_thread_pass.cpp(23) : see declaration of 'non_copyable'
  15. // C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\xmemory0(605) : while compiling class template member function 'void std::allocator<_Ty>::construct(_Ty *,const _Ty &)'
  16. // with
  17. // [
  18. // _Ty=non_copyable
  19. // ]
  20. #if defined BOOST_THREAD_USES_BOOST_DEQUE || defined BOOST_NO_CXX11_RVALUE_REFERENCES || (defined _MSC_VER && _MSC_FULL_VER < 180020827)
  21. #ifndef BOOST_THREAD_USES_BOOST_DEQUE
  22. #define BOOST_THREAD_USES_BOOST_DEQUE
  23. #endif
  24. #include <boost/container/deque.hpp>
  25. #else
  26. #include <deque>
  27. #endif
  28. namespace boost
  29. {
  30. namespace csbl
  31. {
  32. #if defined BOOST_THREAD_USES_BOOST_DEQUE
  33. using ::boost::container::deque;
  34. #else
  35. using ::std::deque;
  36. #endif
  37. }
  38. }
  39. #endif // header