Commit Graph
9 Commits
Author SHA1 Message Date
Andrey Semashev 9fc2a2f1ac Renamed boost::swap to boost::core::invoke_swap, deprecated boost::swap.
The rename allows to avoid forming an infinite recursion in compile time
(because of noexcept specification that needs to resolve the unqualified call
to swap) or run time (in case if the boost::swap function is the only one
suitable for the passed arguments).

To avoid the compile-time recursion, removed noexcept specification from
boost::swap. The specification is still present in boost::core::invoke_swap.

Deprecated boost::swap and associated headers. boost::core::invoke_swap
is defined in a new boost/core/invoke_swap.hpp header.

Updated docs and tests. Removed tests that check inclusion of deprecated
headers.

Fixes https://github.com/boostorg/core/issues/148.
2023-07-12 12:17:07 +03:00
Andrey Semashev 0890785fec Added #pragma once in swap.hpp. 2023-01-07 03:52:46 +03:00
Andrey Semashev 8a8738a981 Propagate noexcept specification in boost::swap.
Mark boost::swap noexcept if the type supports non-throwing swap
implementation.
2023-01-07 03:42:15 +03:00
Andrey Semashev 2b102e7357 Test the standard library rather than the compiler to select the standard header for std::swap. 2020-05-21 02:04:43 +03:00
Peter Dimov e59271fdc2 Check BOOST_MSVC in addition to __cplusplus, because msvc doesn't define __cplusplus correctly 2019-12-02 02:15:55 +02:00
Nikita Kniazev bc82adcd0b Remove implementation specific handling 2019-12-02 01:11:04 +03:00
Nikita Kniazev 868cb07578 Try to include std::swap from the most lightweight header
Based on Boost.Move idea
2019-12-01 17:28:07 +03:00
Peter Dimov a5c891441c Disable boost::swap for const objects. Fixes #43. 2018-10-24 12:23:56 +03:00
Glen Fernandes 60c9a35d86 Move headers to core; add quickbook documentation 2014-06-02 00:46:33 -07:00