summaryrefslogtreecommitdiff
path: root/include/optional
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2018-01-02 17:17:01 +0000
committerMarshall Clow <mclow.lists@gmail.com>2018-01-02 17:17:01 +0000
commitc58e4723e767281311f1c926228fdf1692ad9ba6 (patch)
treeed9a548bc2702df067538fb9730d14c9d07d39ec /include/optional
parent05e705f9ecc348e42a710325743dd3bccbc89569 (diff)
Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321658 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/optional')
-rw-r--r--include/optional4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/optional b/include/optional
index 35a4d74c2..88fd6b5ab 100644
--- a/include/optional
+++ b/include/optional
@@ -22,7 +22,7 @@ namespace std {
// 23.6.4, no-value state indicator
struct nullopt_t{see below };
- constexpr nullopt_t nullopt(unspecified );
+ inline constexpr nullopt_t nullopt(unspecified );
// 23.6.5, class bad_optional_access
class bad_optional_access;
@@ -195,7 +195,7 @@ struct nullopt_t
_LIBCPP_INLINE_VISIBILITY constexpr explicit nullopt_t(__secret_tag, __secret_tag) noexcept {}
};
-/* inline */ constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}};
+_LIBCPP_INLINE_VAR constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}};
template <class _Tp, bool = is_trivially_destructible<_Tp>::value>
struct __optional_destruct_base;