mirror of
https://github.com/boostorg/move.git
synced 2026-01-26 08:52:26 +01:00
- Remove config_begin.hpp/config_end.hpp includes in tests to avoid disabling warnings.
- Fixes #30 ("(void) C-cast is a non-portable way of suppressing compiler warnings").
This commit is contained in:
@@ -8,8 +8,9 @@
|
||||
// See http://www.boost.org/libs/move for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include "../example/movable.hpp"
|
||||
#include "../example/copymovable.hpp"
|
||||
@@ -23,36 +24,36 @@ class non_movable
|
||||
};
|
||||
|
||||
template<class MaybeRvalue>
|
||||
void catch_test(BOOST_RV_REF(MaybeRvalue) x
|
||||
void catch_test(BOOST_RV_REF(MaybeRvalue)
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
,typename ::boost::enable_if< ::boost::has_move_emulation_enabled<MaybeRvalue> >::type* = 0
|
||||
#endif //BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
)
|
||||
{ (void)x;}
|
||||
{}
|
||||
|
||||
template<class MaybeRvalue>
|
||||
void catch_test(BOOST_COPY_ASSIGN_REF(MaybeRvalue) x
|
||||
void catch_test(BOOST_COPY_ASSIGN_REF(MaybeRvalue)
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
,typename ::boost::enable_if< ::boost::has_move_emulation_enabled<MaybeRvalue> >::type* = 0
|
||||
#endif //BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
)
|
||||
|
||||
{ (void)x;}
|
||||
{}
|
||||
|
||||
template<class MaybeRvalue>
|
||||
void catch_test(MaybeRvalue &x
|
||||
void catch_test(MaybeRvalue &
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
,typename ::boost::enable_if< ::boost::has_move_emulation_enabled<MaybeRvalue> >::type* = 0
|
||||
#endif //BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
)
|
||||
{ (void)x;}
|
||||
{}
|
||||
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template<class MaybeRvalue>
|
||||
void catch_test(const MaybeRvalue& x
|
||||
void catch_test(const MaybeRvalue&
|
||||
,typename ::boost::disable_if< ::boost::has_move_emulation_enabled<MaybeRvalue> >::type* = 0
|
||||
)
|
||||
{ (void)x;}
|
||||
{}
|
||||
#endif //BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
movable create_movable()
|
||||
@@ -113,5 +114,3 @@ int main()
|
||||
forward_test();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
Reference in New Issue
Block a user