1
0
forked from boostorg/bind

Update tests to use boost/bind/bind.hpp instead of boost/bind.hpp

This commit is contained in:
Peter Dimov
2019-12-13 19:34:30 +02:00
parent 5c21b6a525
commit 66ddaf88e1
46 changed files with 109 additions and 47 deletions

View File

@ -19,10 +19,12 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <iostream>
#include <string>
using namespace boost::placeholders;
std::string f(std::string const & x)
{
return "f(" + x + ")";

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/ref.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
@ -31,6 +31,8 @@
#pragma warning(pop)
#endif
using namespace boost::placeholders;
//
struct visitor

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)
@ -31,6 +31,8 @@
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
bool f( bool x )
{
return x;

View File

@ -27,7 +27,7 @@ int main()
#define BOOST_MEM_FN_ENABLE_CDECL
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)

View File

@ -18,7 +18,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/ref.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
@ -33,6 +33,8 @@
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
//
long f_0()

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)
@ -32,6 +32,8 @@
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
struct X
{
int m;

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)
@ -32,6 +32,8 @@
#include <boost/detail/lightweight_test.hpp>
#include <utility>
using namespace boost::placeholders;
int main()
{
typedef std::pair<int, int> pair_type;

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)
@ -31,6 +31,8 @@
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
struct X
{
int m;

View File

@ -17,10 +17,12 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/function_equal.hpp>
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
void f( int )
{
}

View File

@ -17,11 +17,13 @@
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/function_equal.hpp>
#include <boost/weak_ptr.hpp>
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
int f( boost::weak_ptr<void> wp )
{
return wp.use_count();

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/ref.hpp>
#ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
@ -36,6 +36,8 @@
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
struct X
{
int i_;

View File

@ -27,7 +27,7 @@ int main()
#define BOOST_MEM_FN_ENABLE_FASTCALL
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)

View File

@ -27,7 +27,7 @@ int main()
#define BOOST_BIND_ENABLE_FASTCALL
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)
@ -41,6 +41,8 @@ int main()
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
//
long __fastcall f_0()

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)

View File

@ -10,10 +10,12 @@
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/function.hpp>
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
//
void fv1( int & a )

View File

@ -26,11 +26,13 @@ int main()
# endif
#endif
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/function.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <memory>
using namespace boost::placeholders;
//
void fv1( std::auto_ptr<int> p1 )

View File

@ -28,7 +28,7 @@
#pragma warning(pop)
#endif
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/detail/lightweight_test.hpp>
int f( int x )

View File

@ -10,9 +10,11 @@
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
//
int fv1( int const & a )

View File

@ -10,9 +10,11 @@
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
//
void fv1( int & a )

View File

@ -8,7 +8,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
template<class T> void value();

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)

View File

@ -10,11 +10,13 @@
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/make_shared.hpp>
#include <boost/function.hpp>
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
//
bool f1( boost::shared_ptr<int> p1 )

View File

@ -8,7 +8,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/ref.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>

View File

@ -8,10 +8,12 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
using namespace boost::placeholders;
#if defined(BOOST_NO_CXX11_NOEXCEPT)
int main()

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)
@ -31,6 +31,8 @@
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
template<class F, class A1, class R> void test( F f, A1 a1, R r )
{
BOOST_TEST( f(a1) == r );

View File

@ -18,7 +18,7 @@
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)

View File

@ -8,10 +8,12 @@
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/ref.hpp>
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
struct X
{
int f( int x )

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)
@ -31,6 +31,8 @@
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
int f( int x )
{
return x + x;

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)

View File

@ -18,7 +18,7 @@
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)
@ -32,6 +32,8 @@
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
//
int f( int x )

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)

View File

@ -27,7 +27,7 @@ int main()
#define BOOST_MEM_FN_ENABLE_STDCALL
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)

View File

@ -29,7 +29,7 @@ int main()
#define BOOST_BIND_ENABLE_STDCALL
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)
@ -43,6 +43,8 @@ int main()
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
//
long __stdcall f_0()

View File

@ -18,7 +18,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/ref.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
@ -33,6 +33,8 @@
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
//
long f_0()

View File

@ -10,9 +10,11 @@
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
//
template<int I> struct X

View File

@ -17,7 +17,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)

View File

@ -18,10 +18,12 @@ int main()
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <memory>
using namespace boost::placeholders;
//
void fv1( std::unique_ptr<int> p1 )

View File

@ -15,7 +15,7 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/visit_each.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
@ -31,6 +31,8 @@
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
struct visitor
{
int hash;

View File

@ -18,7 +18,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/ref.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
@ -33,6 +33,8 @@
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
//
struct Z

View File

@ -18,7 +18,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/ref.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)

View File

@ -18,7 +18,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/ref.hpp>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
@ -33,6 +33,8 @@
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
//
long global_result;

View File

@ -18,10 +18,12 @@ int main()
#else
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/core/lightweight_test.hpp>
#include <functional>
using namespace boost::placeholders;
namespace std
{

View File

@ -8,10 +8,12 @@
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/bind/protect.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/detail/lightweight_test.hpp>
using namespace boost::placeholders;
int f(int x)
{
return x;

View File

@ -1,5 +1,5 @@
//
// quick.cpp - a quick test for boost/bind.hpp
// quick.cpp - a quick test for boost/bind/bind.hpp
//
// Copyright 2017 Peter Dimov
//
@ -9,9 +9,11 @@
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/core/lightweight_test.hpp>
using namespace boost::placeholders;
int f( int a, int b, int c )
{
return a + 10 * b + 100 * c;