-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from olk/develop
defect macro for C++17 feature `std::invoke()`
- Loading branch information
Showing
19 changed files
with
180 additions
and
6 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
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
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
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 |
---|---|---|
|
@@ -196,3 +196,6 @@ | |
#else | ||
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX | ||
#endif | ||
|
||
// C++17 features | ||
# define BOOST_NO_CXX17_STD_INVOKE |
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
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,27 @@ | ||
// (C) Copyright Oliver Kowalke 2016. | ||
// Use, modification and distribution are 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) | ||
|
||
// See http://www.boost.org/libs/config for most recent version. | ||
|
||
// MACRO: BOOST_NO_CXX17_STD_INVOKE | ||
// TITLE: invoke | ||
// DESCRIPTION: The compiler supports the std::invoke() function. | ||
|
||
#include <functional> | ||
|
||
namespace boost_no_cxx17_std_invoke { | ||
|
||
int foo( int i, int j) { | ||
return i + j; | ||
} | ||
|
||
int test() { | ||
int i = 1, j = 2; | ||
std::invoke( foo, i, j); | ||
return 0; | ||
} | ||
|
||
} | ||
|
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,37 @@ | ||
// This file was automatically generated on Fri Oct 14 12:13:46 2016 | ||
// by libs/config/tools/generate.cpp | ||
// Copyright John Maddock 2002-4. | ||
// Use, modification and distribution are 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) | ||
|
||
// See http://www.boost.org/libs/config for the most recent version.// | ||
// Revision $Id$ | ||
// | ||
|
||
|
||
// Test file for macro BOOST_NO_CXX17_STD_INVOKE | ||
// This file should not compile, if it does then | ||
// BOOST_NO_STD_INVOKE should not be defined. | ||
// See file boost_no_cxx17_std_invoke.ipp for details | ||
|
||
// Must not have BOOST_ASSERT_CONFIG set; it defeats | ||
// the objective of this file: | ||
#ifdef BOOST_ASSERT_CONFIG | ||
# undef BOOST_ASSERT_CONFIG | ||
#endif | ||
|
||
#include <boost/config.hpp> | ||
#include "test.hpp" | ||
|
||
#ifdef BOOST_NO_CXX17_STD_INVOKE | ||
#include "boost_no_cxx17_std_invoke.ipp" | ||
#else | ||
#error "this file should not compile" | ||
#endif | ||
|
||
int main( int, char *[] ) | ||
{ | ||
return boost_no_cxx17_std_invoke::test(); | ||
} | ||
|
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,37 @@ | ||
// This file was automatically generated on Fri Oct 14 12:13:46 2016 | ||
// by libs/config/tools/generate.cpp | ||
// Copyright John Maddock 2002-4. | ||
// Use, modification and distribution are 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) | ||
|
||
// See http://www.boost.org/libs/config for the most recent version.// | ||
// Revision $Id$ | ||
// | ||
|
||
|
||
// Test file for macro BOOST_NO_CXX17_STD_INVOKE | ||
// This file should compile, if it does not then | ||
// BOOST_NO_STD_INVOKE should be defined. | ||
// See file boost_no_cxx17_std_invoke.ipp for details | ||
|
||
// Must not have BOOST_ASSERT_CONFIG set; it defeats | ||
// the objective of this file: | ||
#ifdef BOOST_ASSERT_CONFIG | ||
# undef BOOST_ASSERT_CONFIG | ||
#endif | ||
|
||
#include <boost/config.hpp> | ||
#include "test.hpp" | ||
|
||
#ifndef BOOST_NO_CXX17_STD_INVOKE | ||
#include "boost_no_cxx17_std_invoke.ipp" | ||
#else | ||
namespace boost_no_cxx17_std_invoke = empty_boost; | ||
#endif | ||
|
||
int main( int, char *[] ) | ||
{ | ||
return boost_no_cxx17_std_invoke::test(); | ||
} | ||
|