From 0305c842e6056f926569e167afbef49f05c9c438 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Thu, 27 Oct 2022 09:26:52 +0200 Subject: [PATCH] Fix build on CentOS 7 This fixes a regression in 9d303a74e (maybe_t: make maybe_t trivially copyable if T is, 2022-10-26). I subscribed to the launchpad repo now -.- --- src/maybe.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/maybe.h b/src/maybe.h index 4b7de55cc..236c4bf04 100644 --- a/src/maybe.h +++ b/src/maybe.h @@ -147,10 +147,14 @@ inline constexpr none_t none() { return none_t::none; } // This is a value-type class that stores a value of T in aligned storage. template class maybe_t : private maybe_detail::conditionally_copyable_t { +#if __GNUG__ && __GNUC__ < 5 + using maybe_impl_t = maybe_detail::maybe_impl_not_trivially_copyable_t; +#else using maybe_impl_t = typename std::conditional::value, maybe_detail::maybe_impl_trivially_copyable_t, - maybe_detail::maybe_impl_not_trivially_copyable_t>::type; + maybe_detail::maybe_impl_not_trivially_copyable_t >::type; +#endif maybe_impl_t impl_; public: