Skip to content
Snippets Groups Projects
Commit 83f01c0b authored by Axel Naumann's avatar Axel Naumann
Browse files

[foundation] libC++ does not set __cpp_lib_not_fn:

Instead, test for libC++ and language version.
This fixes MacOS builds with >=C++14 and tests enabled.
parent e361d6d6
No related branches found
No related tags found
No related merge requests found
...@@ -16,8 +16,12 @@ ...@@ -16,8 +16,12 @@
#include <functional> #include <functional>
// Backport if not_fn is not available // Backport if not_fn is not available.
#ifndef __cpp_lib_not_fn // libc++ does not define __cpp_lib_not_fn.
// Assume we have not_fn if libc++ is compiled with C++14 and up.
#if !defined(__cpp_lib_not_fn) && !(defined(_LIBCPP_VERSION) && __cplusplus > 201103L)
#define R__NOTFN_BACKPORT
#include <type_traits> // std::decay #include <type_traits> // std::decay
#include <utility> // std::forward, std::declval #include <utility> // std::forward, std::declval
......
#include "ROOT/RNotFn.hxx" #include "ROOT/RNotFn.hxx"
#ifndef __cpp_lib_not_fn // libc++ does not define __cpp_lib_not_fn.
// Assume we have not_fn if
#if defined(R__NOTFN_BACKPORT)
#include "gtest/gtest.h" #include "gtest/gtest.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment