aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/regex.h
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2017-06-07 16:43:54 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2017-06-07 16:43:54 +0100
commitbfd88d1df1c57ef5ad3ed34bbb1672359d4eaabf (patch)
treea594a0868225358bcc6ff9f4604556ca49b1696b /libstdc++-v3/include/bits/regex.h
parentd840779ff4ea300b162c4ab45ff6c81ea7303bce (diff)
Add C++17 deduction guide for std::basic_regex (P0433R2, partial)
* include/bits/regex.h (basic_regex): Add deduction guide from P0433. * testsuite/28_regex/basic_regex/ctors/deduction.cc: New. From-SVN: r248990
Diffstat (limited to 'libstdc++-v3/include/bits/regex.h')
-rw-r--r--libstdc++-v3/include/bits/regex.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/regex.h b/libstdc++-v3/include/bits/regex.h
index 1710db90e74..0bb88cb6afb 100644
--- a/libstdc++-v3/include/bits/regex.h
+++ b/libstdc++-v3/include/bits/regex.h
@@ -787,6 +787,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
_AutomatonPtr _M_automaton;
};
+#if __cpp_deduction_guides >= 201606
+ template<typename _ForwardIterator>
+ basic_regex(_ForwardIterator, _ForwardIterator,
+ regex_constants::syntax_option_type = {})
+ -> basic_regex<typename iterator_traits<_ForwardIterator>::value_type>;
+#endif
+
/** @brief Standard regular expressions. */
typedef basic_regex<char> regex;