- 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
+16 -18
View File
@@ -9,8 +9,8 @@
// See http://www.boost.org/libs/move for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/move/detail/config_begin.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/core/ignore_unused.hpp>
#include "../example/movable.hpp"
#include "../example/copymovable.hpp"
#include <boost/static_assert.hpp>
@@ -110,40 +110,40 @@ int main()
movable m2(boost::move(m));
movable m3(function(movable(boost::move(m2))));
movable m4(function(boost::move(m3)));
(void)m;(void)m2;(void)m3;(void)m4;
::boost::ignore_unused(m);::boost::ignore_unused(m2);::boost::ignore_unused(m3);::boost::ignore_unused(m4);
}
{
movable m;
movable m2(boost::move(m));
movable m3(functionr(movable(boost::move(m2))));
movable m4(functionr(boost::move(m3)));
(void)m;(void)m2;(void)m3;(void)m4;
::boost::ignore_unused(m);::boost::ignore_unused(m2);::boost::ignore_unused(m3);::boost::ignore_unused(m4);
}
{
movable m;
movable m2(boost::move(m));
movable m3(function2(movable(boost::move(m2))));
movable m4(function2(boost::move(m3)));
(void)m;(void)m2;(void)m3;(void)m4;
::boost::ignore_unused(m);::boost::ignore_unused(m2);::boost::ignore_unused(m3);::boost::ignore_unused(m4);
}
{
movable m;
movable m2(boost::move(m));
movable m3(function2r(movable(boost::move(m2))));
movable m4(function2r(boost::move(m3)));
(void)m;(void)m2;(void)m3;(void)m4;
::boost::ignore_unused(m);::boost::ignore_unused(m2);::boost::ignore_unused(m3);::boost::ignore_unused(m4);
}
{
movable m;
movable m2(boost::move(m));
movable m3(move_return_function());
(void)m;(void)m2;(void)m3;
::boost::ignore_unused(m);::boost::ignore_unused(m2);::boost::ignore_unused(m3);
}
{
movable m;
movable m2(boost::move(m));
movable m3(move_return_function2());
(void)m;(void)m2;(void)m3;
::boost::ignore_unused(m);::boost::ignore_unused(m2);::boost::ignore_unused(m3);
}
{
//movable
@@ -151,9 +151,9 @@ int main()
m = factory_wrapper<movable>(factory<movable>());
movable&mr(factory_wrapper<movable&>(factory<movable&>()));
movable&mr2 = factory_wrapper<movable&>(factory<movable&>());
(void)mr;
(void)mr2;
(void)m;
::boost::ignore_unused(mr);
::boost::ignore_unused(mr2);
::boost::ignore_unused(m);
}
{
//copyable
@@ -161,9 +161,9 @@ int main()
c = factory_wrapper<copyable>(factory<copyable>());
copyable&cr(factory_wrapper<copyable&>(factory<copyable&>()));
copyable&cr2 = factory_wrapper<copyable&>(factory<copyable&>());
(void)cr;
(void)cr2;
(void)c;
::boost::ignore_unused(cr);
::boost::ignore_unused(cr2);
::boost::ignore_unused(c);
}
{
@@ -172,12 +172,10 @@ int main()
c = factory_wrapper<copy_movable>(factory<copy_movable>());
copy_movable&cr(factory_wrapper<copy_movable&>(factory<copy_movable&>()));
copy_movable&cr2 = factory_wrapper<copy_movable&>(factory<copy_movable&>());
(void)cr;
(void)cr2;
(void)c;
::boost::ignore_unused(cr);
::boost::ignore_unused(cr2);
::boost::ignore_unused(c);
}
return 0;
}
#include <boost/move/detail/config_end.hpp>