forked from boostorg/array
Enable warnings=extra, warnings-as-errors=on in test suite
This commit is contained in:
@ -326,7 +326,7 @@ namespace boost {
|
||||
#if BOOST_WORKAROUND(BOOST_GCC, < 90000)
|
||||
|
||||
template<class T>
|
||||
BOOST_CXX14_CONSTEXPR bool operator== (const array<T, 0>& x, const array<T, 0>& y)
|
||||
BOOST_CXX14_CONSTEXPR bool operator== (const array<T, 0>& /*x*/, const array<T, 0>& /*y*/)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -353,7 +353,7 @@ namespace boost {
|
||||
#if BOOST_WORKAROUND(BOOST_GCC, < 90000)
|
||||
|
||||
template<class T>
|
||||
BOOST_CXX14_CONSTEXPR bool operator< (const array<T, 0>& x, const array<T, 0>& y)
|
||||
BOOST_CXX14_CONSTEXPR bool operator< (const array<T, 0>& /*x*/, const array<T, 0>& /*y*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -397,7 +397,7 @@ namespace boost {
|
||||
}
|
||||
|
||||
template<class T>
|
||||
constexpr auto operator<=> (const array<T,0>& x, const array<T,0>& y)
|
||||
constexpr auto operator<=> (const array<T,0>& /*x*/, const array<T,0>& /*y*/)
|
||||
-> decltype( 0 <=> 0 )
|
||||
{
|
||||
return 0 <=> 0; // std::strong_ordering::equal
|
||||
|
@ -7,6 +7,16 @@ import testing ;
|
||||
import-search /boost/config/checks ;
|
||||
import config : requires ;
|
||||
|
||||
project
|
||||
: requirements
|
||||
|
||||
<warnings>extra
|
||||
|
||||
<toolset>msvc:<warnings-as-errors>on
|
||||
<toolset>clang:<warnings-as-errors>on
|
||||
<toolset>gcc:<warnings-as-errors>on
|
||||
;
|
||||
|
||||
#
|
||||
|
||||
run array0.cpp ;
|
||||
|
@ -5,6 +5,8 @@
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#define BOOST_ALLOW_DEPRECATED_SYMBOLS // assign
|
||||
|
||||
#include <iostream>
|
||||
#include <boost/array.hpp>
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#define BOOST_ALLOW_DEPRECATED_SYMBOLS // get_c_array
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <boost/array.hpp>
|
||||
|
@ -5,6 +5,8 @@
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#define BOOST_ALLOW_DEPRECATED_SYMBOLS // std::get
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <boost/array.hpp>
|
||||
|
@ -2,12 +2,13 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_ALLOW_DEPRECATED_SYMBOLS
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
// assign is a nonstandard equivalent of fill
|
||||
// it probably needs to be deprecated and removed
|
||||
// assign is a deprecated nonstandard equivalent of fill
|
||||
|
||||
template<class T, std::size_t N> void test()
|
||||
{
|
||||
|
@ -2,14 +2,15 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_ALLOW_DEPRECATED_SYMBOLS
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
// c_array and get_c_array are nonstandard extensions
|
||||
// probably need to be deprecated and removed
|
||||
// c_array and get_c_array are deprecated nonstandard extensions
|
||||
|
||||
template<class T, std::size_t N> void test()
|
||||
{
|
||||
|
@ -15,6 +15,8 @@ template<class T, std::size_t N> void test1()
|
||||
BOOST_TEST_EQ( a.size(), N );
|
||||
BOOST_TEST_EQ( a.empty(), N == 0 );
|
||||
BOOST_TEST_EQ( a.max_size(), N );
|
||||
|
||||
(void)a; // msvc-12.0
|
||||
}
|
||||
|
||||
{
|
||||
@ -23,6 +25,8 @@ template<class T, std::size_t N> void test1()
|
||||
BOOST_TEST_EQ( a.size(), N );
|
||||
BOOST_TEST_EQ( a.empty(), N == 0 );
|
||||
BOOST_TEST_EQ( a.max_size(), N );
|
||||
|
||||
(void)a; // msvc-12.0
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user