Renamed 'test_adl_barrier.cpp' to 'no_ambiguity_in_boost.cpp' and altered comments to reflect new disambiguation technique.

[SVN r47972]
This commit is contained in:
Joseph Gauterin 2008-08-04 18:22:10 +00:00
parent 49faf23433
commit 7019e18149
2 changed files with 5 additions and 4 deletions

View File

@ -28,6 +28,6 @@ test-suite utility/swap
[ run std_vector_of_boost.cpp ../../../test/build//boost_test_exec_monitor/<link>static ] [ run std_vector_of_boost.cpp ../../../test/build//boost_test_exec_monitor/<link>static ]
[ run std_vector_of_global.cpp ../../../test/build//boost_test_exec_monitor/<link>static ] [ run std_vector_of_global.cpp ../../../test/build//boost_test_exec_monitor/<link>static ]
[ run std_vector_of_other.cpp ../../../test/build//boost_test_exec_monitor/<link>static ] [ run std_vector_of_other.cpp ../../../test/build//boost_test_exec_monitor/<link>static ]
[ run test_adl_barrier.cpp ../../../test/build//boost_test_exec_monitor/<link>static ] [ run no_ambiguity_in_boost.cpp ../../../test/build//boost_test_exec_monitor/<link>static ]
[ run swap_arrays.cpp ../../../test/build//boost_test_exec_monitor/<link>static ] [ run swap_arrays.cpp ../../../test/build//boost_test_exec_monitor/<link>static ]
; ;

View File

@ -7,9 +7,10 @@
// boost::swap internally does an unqualified function call to swap. // boost::swap internally does an unqualified function call to swap.
// This could have led to ambiguity or infinite recursion, when the // This could have led to ambiguity or infinite recursion, when the
// objects to be swapped would themselves be from the boost namespace. // objects to be swapped would themselves be from the boost namespace.
// If so, boost::swap itself might be found by argument dependent lookup // If so, boost::swap itself might be found by argument dependent lookup.
// (ADL). The implementation of boost::swap resolves this issue by // The implementation of boost::swap resolves this issue by giving
// using a barrier namespace. The following test checks this "ADL barrier". // boost::swap two template argumetns, thereby making it less specialized
// than std::swap.
#include <boost/utility/swap.hpp> #include <boost/utility/swap.hpp>
#define BOOST_INCLUDE_MAIN #define BOOST_INCLUDE_MAIN