forked from boostorg/move
- 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:
@@ -11,8 +11,6 @@
|
||||
#ifndef BOOST_MOVE_TEST_COPYMOVABLE_HPP
|
||||
#define BOOST_MOVE_TEST_COPYMOVABLE_HPP
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
|
||||
//[copy_movable_definition
|
||||
//header file "copymovable.hpp"
|
||||
#include <boost/move/core.hpp>
|
||||
@@ -59,6 +57,4 @@ class non_copy_movable
|
||||
|
||||
//]
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_MOVE_TEST_COPYMOVABLE_HPP
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
// See http://www.boost.org/libs/move for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
//[clone_ptr_base_derived
|
||||
@@ -153,5 +152,3 @@ int main()
|
||||
//]
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
|
||||
//[construct_forward_example
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <iostream>
|
||||
@@ -105,5 +103,3 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
//]
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <cassert>
|
||||
|
||||
//[file_descriptor_def
|
||||
|
||||
#include <boost/move/utility_core.hpp>
|
||||
@@ -25,8 +22,8 @@ class file_descriptor
|
||||
return 1;
|
||||
}
|
||||
|
||||
void operating_system_close_file(int fd)
|
||||
{ (void)fd; assert(fd != 0); }
|
||||
void operating_system_close_file(int)
|
||||
{}
|
||||
//->
|
||||
int os_descr_;
|
||||
|
||||
@@ -88,5 +85,3 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
//]
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
@@ -20,8 +20,6 @@ int main()
|
||||
|
||||
#else
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
|
||||
//[how_works_example
|
||||
#include <boost/move/core.hpp>
|
||||
#include <iostream>
|
||||
@@ -58,6 +56,4 @@ int main()
|
||||
}
|
||||
//]
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
|
||||
//[move_algorithms_example
|
||||
#include "movable.hpp"
|
||||
#include <boost/move/algorithm.hpp>
|
||||
@@ -43,4 +41,3 @@ int main()
|
||||
}
|
||||
//]
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
|
||||
//[move_inserter_example
|
||||
#include <boost/container/list.hpp>
|
||||
#include "movable.hpp"
|
||||
@@ -48,5 +46,3 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
//]
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// See http://www.boost.org/libs/move for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
|
||||
//[move_iterator_example
|
||||
#include <boost/container/vector.hpp>
|
||||
#include "movable.hpp"
|
||||
@@ -37,5 +37,3 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
//]
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
//[move_return_example
|
||||
#include "movable.hpp"
|
||||
@@ -61,10 +61,8 @@ int main()
|
||||
copyable c = lock_wrapper(factory_functor<copyable> ());
|
||||
non_copy_movable &mr = lock_wrapper(return_reference ());
|
||||
//<-
|
||||
(void)m; (void)cm; (void)c; (void)mr;
|
||||
boost::ignore_unused(m); boost::ignore_unused(cm); boost::ignore_unused(c); boost::ignore_unused(mr);
|
||||
//->
|
||||
return 0;
|
||||
}
|
||||
//]
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/detail/meta_utils_core.hpp>
|
||||
|
||||
#include <boost/move/move.hpp>
|
||||
@@ -94,5 +93,3 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#ifndef BOOST_MOVE_TEST_MOVABLE_HPP
|
||||
#define BOOST_MOVE_TEST_MOVABLE_HPP
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
|
||||
//[movable_definition
|
||||
//header file "movable.hpp"
|
||||
#include <boost/move/core.hpp>
|
||||
@@ -52,6 +50,4 @@ struct has_nothrow_move<movable>
|
||||
} //namespace boost{
|
||||
//]
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_MOVE_TEST_MOVABLE_HPP
|
||||
|
||||
Reference in New Issue
Block a user