From 89813870eb9e9d558e2bb279f1915fef596e25ad Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Wed, 22 Aug 2018 14:12:40 +0100 Subject: [PATCH] Only include vector workaround if vector has been included --- tl/expected.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tl/expected.hpp b/tl/expected.hpp index e00a248..a4d9d62 100644 --- a/tl/expected.hpp +++ b/tl/expected.hpp @@ -75,6 +75,7 @@ // for non-copyable types #elif (defined(__GNUC__) && __GNUC__ < 8 && \ !defined(__clang__)) +#ifdef _GLIBCXX_VECTOR #ifndef TL_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX #define TL_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX namespace tl { @@ -87,6 +88,7 @@ namespace tl { } } #endif +#endif #define TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \ tl::detail::is_trivially_copy_constructible