simple_swap.hpp 859 B

1234567891011121314151617181920212223242526272829
  1. #ifndef BOOST_INTERPROCESS_DETAIL_SWAP_HPP
  2. #define BOOST_INTERPROCESS_DETAIL_SWAP_HPP
  3. //////////////////////////////////////////////////////////////////////////////
  4. //
  5. // (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost
  6. // Software License, Version 1.0. (See accompanying file
  7. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. //
  9. // See http://www.boost.org/libs/interprocess for documentation.
  10. //
  11. //////////////////////////////////////////////////////////////////////////////
  12. #ifndef BOOST_CONFIG_HPP
  13. # include <boost/config.hpp>
  14. #endif
  15. #
  16. #if defined(BOOST_HAS_PRAGMA_ONCE)
  17. # pragma once
  18. #endif
  19. namespace boost { namespace interprocess {
  20. template<class T>
  21. void simple_swap(T&x, T&y)
  22. { T tmp(x); x = y; y = tmp; }
  23. }} //namespace boost{ namespace interprocess {
  24. #endif //#ifndef BOOST_INTERPROCESS_DETAIL_SWAP_HPP