- 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:
Ion Gaztañaga
2020-10-20 11:28:27 +02:00
parent 01d8832c9e
commit e4c47fcb90
26 changed files with 101 additions and 182 deletions

View File

@@ -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>