[v3 PATCH] Protect optional's deduction guide with the feature macro
Ville Voutilainen
ville.voutilainen@gmail.com
Wed Jan 3 14:34:00 GMT 2018
Tested partially on Linux-x64, finishing testing the full suite on
Linux-PPC64. Ok for trunk?
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.
-------------- next part --------------
diff --git a/libstdc++-v3/include/std/optional b/libstdc++-v3/include/std/optional
index e017eed..f7c72b5 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
More information about the Libstdc++
mailing list