/Src/Dependencies/Boost/boost/multi_index/detail/adl_swap.hpp

http://hadesmem.googlecode.com/ · C++ Header · 44 lines · 24 code · 13 blank · 7 comment · 0 complexity · 908b1abd66ab33431d08a39f37f6615d MD5 · raw file

  1. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
  2. * Distributed under the Boost Software License, Version 1.0.
  3. * (See accompanying file LICENSE_1_0.txt or copy at
  4. * http://www.boost.org/LICENSE_1_0.txt)
  5. *
  6. * See http://www.boost.org/libs/multi_index for library home page.
  7. */
  8. #ifndef BOOST_MULTI_INDEX_DETAIL_ADL_SWAP_HPP
  9. #define BOOST_MULTI_INDEX_DETAIL_ADL_SWAP_HPP
  10. #if defined(_MSC_VER)&&(_MSC_VER>=1200)
  11. #pragma once
  12. #endif
  13. #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
  14. #include <algorithm>
  15. namespace boost{
  16. namespace multi_index{
  17. namespace detail{
  18. template<typename T>
  19. void adl_swap(T& x,T& y)
  20. {
  21. #if !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
  22. using std::swap;
  23. swap(x,y);
  24. #else
  25. std::swap(x,y);
  26. #endif
  27. }
  28. } /* namespace multi_index::detail */
  29. } /* namespace multi_index */
  30. } /* namespace boost */
  31. #endif