Update is_range, disable -Wvariadic-macros for GCC

This commit is contained in:
Peter Dimov
2022-06-03 20:14:07 +03:00
parent e0e86a1413
commit b8d315fac5
2 changed files with 6 additions and 6 deletions

View File

@@ -10,7 +10,6 @@
#include <boost/type_traits/declval.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/enable_if.hpp>
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <iterator>
@@ -22,9 +21,9 @@ namespace hash_detail
#if !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC, < 40700)
template<class T, class It> true_type is_range_check( It first, It last,
typename std::iterator_traits<It>::difference_type* = 0,
typename enable_if_< !is_same<typename remove_cv<T>::type, typename std::iterator_traits<It>::value_type>::value >::type* = 0 );
template<class T, class It>
integral_constant< bool, !is_same<typename remove_cv<T>::type, typename std::iterator_traits<It>::value_type>::value >
is_range_check( It first, It last );
template<class T> decltype( is_range_check<T>( declval<T const&>().begin(), declval<T const&>().end() ) ) is_range_( int );
template<class T> false_type is_range_( ... );

View File

@@ -60,7 +60,8 @@ build-project ../examples ;
run hash_reference_values.cpp ;
run detail_is_range_test.cpp ;
run detail_is_range_test2.cpp ;
run detail_is_range_test2.cpp
: : : <toolset>gcc:<cxxflags>-Wno-variadic-macros ;
run detail_is_contiguous_range_test.cpp ;
run detail_is_unordered_range_test.cpp ;
@@ -72,4 +73,4 @@ run hash_number_test2.cpp ;
run hash_integral_test.cpp ;
run hash_string_test2.cpp ;
run hash_fs_path_test.cpp /boost//filesystem/<warnings>off ;
run hash_fs_path_test.cpp /boost//filesystem/<warnings>off : : : <toolset>gcc:<cxxflags>-Wno-variadic-macros ;