forked from boostorg/bind
Suppress MSVC warnings
This commit is contained in:
@@ -172,6 +172,11 @@ public:
|
||||
|
||||
list( A... a ): data_( a... ) {}
|
||||
|
||||
#if BOOST_MSVC
|
||||
# pragma warning( push )
|
||||
# pragma warning( disable: 4100 ) // unreferenced formal parameter 'a2'
|
||||
#endif
|
||||
|
||||
template<class R, class F, class A2, std::size_t... I> R call_impl( type<R>, F & f, A2 & a2, _bi::index_sequence<I...> )
|
||||
{
|
||||
return unwrapper<F>::unwrap( f, 0 )( a2[ std::get<I>( data_ ) ]... );
|
||||
@@ -192,6 +197,10 @@ public:
|
||||
unwrapper<F>::unwrap( f, 0 )( a2[ std::get<I>( data_ ) ]... );
|
||||
}
|
||||
|
||||
#if BOOST_MSVC
|
||||
# pragma warning( pop )
|
||||
#endif
|
||||
|
||||
//
|
||||
|
||||
template<class R, class F, class A2> R operator()( type<R>, F & f, A2 & a2 )
|
||||
|
@@ -100,7 +100,7 @@ void function_test()
|
||||
|
||||
struct Y
|
||||
{
|
||||
short operator()(short & r) const { return global_result = ++r; }
|
||||
short operator()(short & r) const { return static_cast<short>( global_result = ++r ); }
|
||||
int operator()(int a, int b) const { return global_result = a + 10 * b; }
|
||||
long operator() (long a, long b, long c) const { return global_result = a + 10 * b + 100 * c; }
|
||||
void operator() (long a, long b, long c, long d) const { global_result = a + 10 * b + 100 * c + 1000 * d; }
|
||||
|
@@ -6,6 +6,12 @@
|
||||
|
||||
#include <boost/bind/protect.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma warning( disable: 4510 ) // default constructor could not be generated
|
||||
# pragma warning( disable: 4610 ) // class can never be instantiated - constructor required
|
||||
#endif
|
||||
|
||||
template<class T, class F> void test( F )
|
||||
{
|
||||
|
Reference in New Issue
Block a user