diff --git a/include/libtorrent/aux_/aligned_storage.hpp b/include/libtorrent/aux_/aligned_storage.hpp index 53df74427..20733cb4e 100644 --- a/include/libtorrent/aux_/aligned_storage.hpp +++ b/include/libtorrent/aux_/aligned_storage.hpp @@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { namespace aux { -#if defined __GNUC__ && __GNUC__ < 5 +#if defined __GNUC__ && __GNUC__ < 5 && !defined(_LIBCPP_VERSION) // this is for backwards compatibility with not-quite C++11 compilers template diff --git a/include/libtorrent/aux_/aligned_union.hpp b/include/libtorrent/aux_/aligned_union.hpp index 7437c6c32..14ee3bac6 100644 --- a/include/libtorrent/aux_/aligned_union.hpp +++ b/include/libtorrent/aux_/aligned_union.hpp @@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { namespace aux { -#if defined __GNUC__ && __GNUC__ < 5 +#if defined __GNUC__ && __GNUC__ < 5 && !defined(_LIBCPP_VERSION) constexpr std::size_t max(std::size_t a) { return a; }