From d163ac49299923183da27a807fda6d9def8ecb59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 13 Nov 2013 21:52:16 +0100 Subject: [PATCH] external: update std::optional with linker fixes for GCC 4.5. --- external/Optional/optional.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/external/Optional/optional.hpp b/external/Optional/optional.hpp index 69b9f1c4b..7d8c313d0 100644 --- a/external/Optional/optional.hpp +++ b/external/Optional/optional.hpp @@ -230,11 +230,19 @@ struct is_not_optional> }; +#if !OPTIONAL_GCC45_COMPATIBILITY constexpr struct trivial_init_t{} trivial_init{}; +#else +const struct trivial_init_t{} trivial_init{}; +#endif // 20.5.6, In-place construction +#if !OPTIONAL_GCC45_COMPATIBILITY constexpr struct in_place_t{} in_place{}; +#else +const struct in_place_t{} in_place{}; +#endif // 20.5.7, Disengaged state indicator @@ -243,7 +251,11 @@ struct nullopt_t struct init{}; constexpr nullopt_t(init){}; }; +#if !OPTIONAL_GCC45_COMPATIBILITY constexpr nullopt_t nullopt{nullopt_t::init{}}; +#else +const nullopt_t nullopt{nullopt_t::init{}}; +#endif // 20.5.8, class bad_optional_access @@ -301,7 +313,11 @@ struct storage_t }; #endif +#if !OPTIONAL_GCC45_COMPATIBILITY constexpr struct only_set_initialized_t{} only_set_initialized{}; +#else +const struct only_set_initialized_t{} only_set_initialized{}; +#endif template