/usr/include/boost/core
NameSizeModeActions
addressof.hpp61530644editdlrm
allocator_access.hpp159440644editdlrm
alloc_construct.hpp34360644editdlrm
checked_delete.hpp16770644editdlrm
default_allocator.hpp33330644editdlrm
demangle.hpp30340644editdlrm
empty_value.hpp33240644editdlrm
enable_if.hpp33150644editdlrm
exchange.hpp9110644editdlrm
explicit_operator_bool.hpp53540644editdlrm
first_scalar.hpp8130644editdlrm
ignore_unused.hpp19760644editdlrm
is_same.hpp7930644editdlrm
lightweight_test.hpp184430644editdlrm
lightweight_test_trait.hpp39730644editdlrm
noinit_adaptor.hpp17910644editdlrm
noncopyable.hpp19110644editdlrm
no_exceptions_support.hpp18720644editdlrm
null_deleter.hpp12320644editdlrm
nvp.hpp10000644editdlrm
pointer_traits.hpp50720644editdlrm
quick_exit.hpp10980644editdlrm
ref.hpp59760644editdlrm
scoped_enum.hpp78800644editdlrm
swap.hpp21230644editdlrm
typeinfo.hpp31510644editdlrm
uncaught_exceptions.hpp68190644editdlrm
underlying_type.hpp22050644editdlrm
use_default.hpp3000644editdlrm
Edit: /usr/include/boost/core/swap.hpp (2123B)
// Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org #ifndef BOOST_CORE_SWAP_HPP #define BOOST_CORE_SWAP_HPP // Note: the implementation of this utility contains various workarounds: // - swap_impl is put outside the boost namespace, to avoid infinite // recursion (causing stack overflow) when swapping objects of a primitive // type. // - swap_impl has a using-directive, rather than a using-declaration, // because some compilers (including MSVC 7.1, Borland 5.9.3, and // Intel 8.1) don't do argument-dependent lookup when it has a // using-declaration instead. // - boost::swap has two template arguments, instead of one, to // avoid ambiguity when swapping objects of a Boost type that does // not have its own boost::swap overload. #include #include #if __cplusplus >= 201103L || defined(BOOST_DINKUMWARE_STDLIB) #include // for std::swap (C++11) #else #include // for std::swap (C++98) #endif #include // for std::size_t namespace boost_swap_impl { // we can't use type_traits here template struct is_const { enum _vt { value = 0 }; }; template struct is_const { enum _vt { value = 1 }; }; template BOOST_GPU_ENABLED void swap_impl(T& left, T& right) { using namespace std;//use std::swap if argument dependent lookup fails swap(left,right); } template BOOST_GPU_ENABLED void swap_impl(T (& left)[N], T (& right)[N]) { for (std::size_t i = 0; i < N; ++i) { ::boost_swap_impl::swap_impl(left[i], right[i]); } } } namespace boost { template BOOST_GPU_ENABLED typename enable_if_c< !boost_swap_impl::is_const::value && !boost_swap_impl::is_const::value >::type swap(T1& left, T2& right) { ::boost_swap_impl::swap_impl(left, right); } } #endif