aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/std/optional2
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