diff --git a/test/optional_test_common.cpp b/test/optional_test_common.cpp index ff197bd..acb935c 100644 --- a/test/optional_test_common.cpp +++ b/test/optional_test_common.cpp @@ -152,21 +152,21 @@ bool X::pending_assign = false ; bool X::throw_on_copy = false ; bool X::throw_on_assign = false ; -inline void set_pending_copy ( X const* x ) { X::pending_copy = true ; } -inline void set_pending_dtor ( X const* x ) { X::pending_dtor = true ; } -inline void set_pending_assign ( X const* x ) { X::pending_assign = true ; } -inline void set_throw_on_copy ( X const* x ) { X::throw_on_copy = true ; } -inline void set_throw_on_assign ( X const* x ) { X::throw_on_assign = true ; } -inline void reset_throw_on_copy ( X const* x ) { X::throw_on_copy = false ; } -inline void reset_throw_on_assign ( X const* x ) { X::throw_on_assign = false ; } -inline void check_is_pending_copy ( X const* x ) { BOOST_TEST( X::pending_copy ) ; } -inline void check_is_pending_dtor ( X const* x ) { BOOST_TEST( X::pending_dtor ) ; } -inline void check_is_pending_assign ( X const* x ) { BOOST_TEST( X::pending_assign ) ; } -inline void check_is_not_pending_copy ( X const* x ) { BOOST_TEST( !X::pending_copy ) ; } -inline void check_is_not_pending_dtor ( X const* x ) { BOOST_TEST( !X::pending_dtor ) ; } -inline void check_is_not_pending_assign( X const* x ) { BOOST_TEST( !X::pending_assign ) ; } -inline void check_instance_count ( int c, X const* x ) { BOOST_TEST( X::count == c ) ; } -inline int get_instance_count ( X const* x ) { return X::count ; } +inline void set_pending_copy ( X const* ) { X::pending_copy = true ; } +inline void set_pending_dtor ( X const* ) { X::pending_dtor = true ; } +inline void set_pending_assign ( X const* ) { X::pending_assign = true ; } +inline void set_throw_on_copy ( X const* ) { X::throw_on_copy = true ; } +inline void set_throw_on_assign ( X const* ) { X::throw_on_assign = true ; } +inline void reset_throw_on_copy ( X const* ) { X::throw_on_copy = false ; } +inline void reset_throw_on_assign ( X const* ) { X::throw_on_assign = false ; } +inline void check_is_pending_copy ( X const* ) { BOOST_TEST( X::pending_copy ) ; } +inline void check_is_pending_dtor ( X const* ) { BOOST_TEST( X::pending_dtor ) ; } +inline void check_is_pending_assign ( X const* ) { BOOST_TEST( X::pending_assign ) ; } +inline void check_is_not_pending_copy ( X const* ) { BOOST_TEST( !X::pending_copy ) ; } +inline void check_is_not_pending_dtor ( X const* ) { BOOST_TEST( !X::pending_dtor ) ; } +inline void check_is_not_pending_assign( X const* ) { BOOST_TEST( !X::pending_assign ) ; } +inline void check_instance_count ( int c, X const* ) { BOOST_TEST( X::count == c ) ; } +inline int get_instance_count ( X const* ) { return X::count ; } inline void set_pending_copy (...) {} inline void set_pending_dtor (...) {} diff --git a/test/optional_test_ref_fail_init_from_Trefref.cpp b/test/optional_test_ref_fail_init_from_Trefref.cpp index 05752b8..a08c08a 100644 --- a/test/optional_test_ref_fail_init_from_Trefref.cpp +++ b/test/optional_test_ref_fail_init_from_Trefref.cpp @@ -10,6 +10,7 @@ // akrzemi1@gmail.com // #include "boost/optional.hpp" +#include "boost/core/ignore_unused.hpp" #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES // @@ -18,6 +19,7 @@ void optional_reference__test_no_init_from_Trefref() { boost::optional opt = int(3); + boost::ignore_unused(opt); } #else diff --git a/test/optional_test_ref_fail_init_from_Urefref.cpp b/test/optional_test_ref_fail_init_from_Urefref.cpp index e15192b..af7ca27 100644 --- a/test/optional_test_ref_fail_init_from_Urefref.cpp +++ b/test/optional_test_ref_fail_init_from_Urefref.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014, andrzej Krzemienski. +// Copyright (C) 2014, 2016 andrzej Krzemienski. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -10,6 +10,7 @@ // akrzemi1@gmail.com // #include "boost/optional.hpp" +#include "boost/core/ignore_unused.hpp" #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES // @@ -18,6 +19,7 @@ void optional_reference__test_no_init_from_Urefref() { boost::optional opt = long(3); + boost::ignore_unused(opt); } #else