mirror of
https://github.com/boostorg/optional.git
synced 2025-07-16 05:42:07 +02:00
removed warnings from tests
This commit is contained in:
@ -152,21 +152,21 @@ bool X::pending_assign = false ;
|
|||||||
bool X::throw_on_copy = false ;
|
bool X::throw_on_copy = false ;
|
||||||
bool X::throw_on_assign = false ;
|
bool X::throw_on_assign = false ;
|
||||||
|
|
||||||
inline void set_pending_copy ( X const* x ) { X::pending_copy = true ; }
|
inline void set_pending_copy ( X const* ) { X::pending_copy = true ; }
|
||||||
inline void set_pending_dtor ( X const* x ) { X::pending_dtor = true ; }
|
inline void set_pending_dtor ( X const* ) { X::pending_dtor = true ; }
|
||||||
inline void set_pending_assign ( X const* x ) { X::pending_assign = true ; }
|
inline void set_pending_assign ( X const* ) { X::pending_assign = true ; }
|
||||||
inline void set_throw_on_copy ( X const* x ) { X::throw_on_copy = true ; }
|
inline void set_throw_on_copy ( X const* ) { X::throw_on_copy = true ; }
|
||||||
inline void set_throw_on_assign ( X const* x ) { X::throw_on_assign = true ; }
|
inline void set_throw_on_assign ( X const* ) { X::throw_on_assign = true ; }
|
||||||
inline void reset_throw_on_copy ( X const* x ) { X::throw_on_copy = false ; }
|
inline void reset_throw_on_copy ( X const* ) { X::throw_on_copy = false ; }
|
||||||
inline void reset_throw_on_assign ( X const* x ) { X::throw_on_assign = false ; }
|
inline void reset_throw_on_assign ( X const* ) { X::throw_on_assign = false ; }
|
||||||
inline void check_is_pending_copy ( X const* x ) { BOOST_TEST( X::pending_copy ) ; }
|
inline void check_is_pending_copy ( X const* ) { BOOST_TEST( X::pending_copy ) ; }
|
||||||
inline void check_is_pending_dtor ( X const* x ) { BOOST_TEST( X::pending_dtor ) ; }
|
inline void check_is_pending_dtor ( X const* ) { BOOST_TEST( X::pending_dtor ) ; }
|
||||||
inline void check_is_pending_assign ( X const* x ) { BOOST_TEST( X::pending_assign ) ; }
|
inline void check_is_pending_assign ( X const* ) { 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_copy ( X const* ) { 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_dtor ( X const* ) { BOOST_TEST( !X::pending_dtor ) ; }
|
||||||
inline void check_is_not_pending_assign( X const* x ) { BOOST_TEST( !X::pending_assign ) ; }
|
inline void check_is_not_pending_assign( X const* ) { BOOST_TEST( !X::pending_assign ) ; }
|
||||||
inline void check_instance_count ( int c, X const* x ) { BOOST_TEST( X::count == c ) ; }
|
inline void check_instance_count ( int c, X const* ) { BOOST_TEST( X::count == c ) ; }
|
||||||
inline int get_instance_count ( X const* x ) { return X::count ; }
|
inline int get_instance_count ( X const* ) { return X::count ; }
|
||||||
|
|
||||||
inline void set_pending_copy (...) {}
|
inline void set_pending_copy (...) {}
|
||||||
inline void set_pending_dtor (...) {}
|
inline void set_pending_dtor (...) {}
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
// akrzemi1@gmail.com
|
// akrzemi1@gmail.com
|
||||||
//
|
//
|
||||||
#include "boost/optional.hpp"
|
#include "boost/optional.hpp"
|
||||||
|
#include "boost/core/ignore_unused.hpp"
|
||||||
|
|
||||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||||
//
|
//
|
||||||
@ -18,6 +19,7 @@
|
|||||||
void optional_reference__test_no_init_from_Trefref()
|
void optional_reference__test_no_init_from_Trefref()
|
||||||
{
|
{
|
||||||
boost::optional<const int&> opt = int(3);
|
boost::optional<const int&> opt = int(3);
|
||||||
|
boost::ignore_unused(opt);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -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
|
// Use, modification, and distribution is subject to the Boost Software
|
||||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -10,6 +10,7 @@
|
|||||||
// akrzemi1@gmail.com
|
// akrzemi1@gmail.com
|
||||||
//
|
//
|
||||||
#include "boost/optional.hpp"
|
#include "boost/optional.hpp"
|
||||||
|
#include "boost/core/ignore_unused.hpp"
|
||||||
|
|
||||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||||
//
|
//
|
||||||
@ -18,6 +19,7 @@
|
|||||||
void optional_reference__test_no_init_from_Urefref()
|
void optional_reference__test_no_init_from_Urefref()
|
||||||
{
|
{
|
||||||
boost::optional<const int&> opt = long(3);
|
boost::optional<const int&> opt = long(3);
|
||||||
|
boost::ignore_unused(opt);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user