diff options
author | Ville Voutilainen <ville.voutilainen@gmail.com> | 2018-01-03 22:33:10 +0200 |
---|---|---|
committer | Ville Voutilainen <ville@gcc.gnu.org> | 2018-01-03 22:33:10 +0200 |
commit | 8bdbeed1d0b00bc21a105712b1b672ebec37358e (patch) | |
tree | e6ef39cbfcabdd637ea6422f235e8a6e8efc39eb | |
parent | 72df5daa5cffef2fb58bcf5cfd2d35f1bf923156 (diff) | |
download | gcc-8bdbeed1d0b00bc21a105712b1b672ebec37358e.zip gcc-8bdbeed1d0b00bc21a105712b1b672ebec37358e.tar.gz gcc-8bdbeed1d0b00bc21a105712b1b672ebec37358e.tar.bz2 |
Protect optional's deduction guide with the feature macro
* include/std/optional: Use the feature macro.
From-SVN: r256185
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/std/optional | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f603e316..64fa720 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com> + + Protect optional's deduction guide with the feature macro + * include/std/optional: Use the feature macro. + 2018-01-03 Jakub Jelinek <jakub@redhat.com> Update copyright years. diff --git a/libstdc++-v3/include/std/optional b/libstdc++-v3/include/std/optional index 76b2b0e..466a11c 100644 --- a/libstdc++-v3/include/std/optional +++ b/libstdc++-v3/include/std/optional @@ -1038,7 +1038,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// @} +#if __cpp_deduction_guides >= 201606 template <typename _Tp> optional(_Tp) -> optional<_Tp>; +#endif _GLIBCXX_END_NAMESPACE_VERSION } // namespace std |