diff --git a/tl/optional.hpp b/tl/optional.hpp index a2b27bc..485b416 100644 --- a/tl/optional.hpp +++ b/tl/optional.hpp @@ -139,6 +139,10 @@ template struct conjunction : std::conditional, B>::type {}; +#if defined(_LIBCPP_VERSION) && __cplusplus == 201103L +#define TL_OPTIONAL_LIBCXX_MEM_FN_WORKAROUND +#endif + // In C++11 mode, there's an issue in libc++'s std::mem_fn // which results in a hard-error when using it in a noexcept expression // in some cases. This is a check to workaround the common failing case.