Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove std::unary/binary_function use, they have been removed in C++17
- Loading branch information
Showing
3 changed files
with
42 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Boost.Function library | ||
|
||
// Copyright 2016 Peter Dimov | ||
|
||
// Use, modification and distribution is subject to | ||
// the Boost Software License, Version 1.0. | ||
// (See accompanying file LICENSE_1_0.txt or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include <boost/function.hpp> | ||
#include <boost/core/is_same.hpp> | ||
#include <boost/core/lightweight_test_trait.hpp> | ||
|
||
struct X | ||
{ | ||
}; | ||
|
||
struct Y | ||
{ | ||
}; | ||
|
||
struct Z | ||
{ | ||
}; | ||
|
||
int main() | ||
{ | ||
typedef boost::function<X(Y)> F1; | ||
|
||
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F1::result_type, X> )); | ||
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F1::argument_type, Y> )); | ||
|
||
typedef boost::function<X(Y, Z)> F2; | ||
|
||
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F2::result_type, X> )); | ||
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F2::first_argument_type, Y> )); | ||
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F2::second_argument_type, Z> )); | ||
|
||
return boost::report_errors(); | ||
} |