From dc129ecf104a706aec384c1766be92aa9b4aad0f Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Wed, 22 Aug 2018 15:22:16 +0100 Subject: [PATCH] Only include vector workaround if vector is included --- tl/optional.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tl/optional.hpp b/tl/optional.hpp index 04600c1..60b14d2 100644 --- a/tl/optional.hpp +++ b/tl/optional.hpp @@ -60,6 +60,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 { @@ -72,6 +73,7 @@ namespace tl { } } #endif +#endif #define TL_OPTIONAL_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \ tl::detail::is_trivially_copy_constructible::value