aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/tr1_impl/regex
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/tr1_impl/regex')
-rw-r--r--libstdc++-v3/include/tr1_impl/regex43
1 files changed, 18 insertions, 25 deletions
diff --git a/libstdc++-v3/include/tr1_impl/regex b/libstdc++-v3/include/tr1_impl/regex
index c2a60a2c3ea..80bc394e96d 100644
--- a/libstdc++-v3/include/tr1_impl/regex
+++ b/libstdc++-v3/include/tr1_impl/regex
@@ -1,6 +1,6 @@
// class template regex -*- C++ -*-
-// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -535,8 +535,7 @@ namespace regex_constants
*/
template<typename _Fwd_iter>
string_type
- transform_primary(_Fwd_iter __first, _Fwd_iter __last) const
- { return string_type(); }
+ transform_primary(_Fwd_iter __first, _Fwd_iter __last) const;
/**
* @brief Gets a collation element by name.
@@ -553,11 +552,10 @@ namespace regex_constants
*/
template<typename _Fwd_iter>
string_type
- lookup_collatename(_Fwd_iter __first, _Fwd_iter __last) const
- { return string_type(); }
+ lookup_collatename(_Fwd_iter __first, _Fwd_iter __last) const;
/**
- * @brief Maps one or mire characters to a named character
+ * @brief Maps one or more characters to a named character
* classification.
*
* @param first beginning of the character sequence.
@@ -591,8 +589,7 @@ namespace regex_constants
*/
template<typename _Fwd_iter>
char_class_type
- lookup_classname(_Fwd_iter __first, _Fwd_iter __last) const
- { return 0; }
+ lookup_classname(_Fwd_iter __first, _Fwd_iter __last) const;
/**
* @brief Determines if @p c is a member of an identified class.
@@ -799,18 +796,18 @@ namespace regex_constants
/**
* @brief Constructs a basic regular expression from the string
- * @p interpreted according to the flags in @p f.
+ * @p s interpreted according to the flags in @p f.
*
- * @param p A string containing a regular expression.
+ * @param s A string containing a regular expression.
* @param f Flags indicating the syntax rules and options.
*
- * @throws regex_error if @p p is not a valid regular expression.
+ * @throws regex_error if @p s is not a valid regular expression.
*/
template<typename _Ch_traits, typename _Ch_alloc>
explicit
basic_regex(const basic_string<_Ch_type, _Ch_traits, _Ch_alloc>& __s,
flag_type __f = regex_constants::ECMAScript)
- : _M_flags(__f), _M_pattern(__s), _M_mark_count(0)
+ : _M_flags(__f), _M_pattern(__s.begin(), __s.end()), _M_mark_count(0)
{ _M_compile(); }
/**
@@ -1043,8 +1040,7 @@ namespace regex_constants
* @brief Compiles a regular expression pattern into a NFA.
* @todo Implement this function.
*/
- void _M_compile()
- { }
+ void _M_compile();
protected:
flag_type _M_flags;
@@ -1071,7 +1067,7 @@ namespace regex_constants
inline void
swap(basic_regex<_Ch_type, _Rx_traits>& __lhs,
basic_regex<_Ch_type, _Rx_traits>& __rhs)
- { return __lhs.swap(__rhs); }
+ { __lhs.swap(__rhs); }
// [7.9] Class template sub_match
@@ -1821,6 +1817,7 @@ namespace regex_constants
{
match_results __tmp(__rhs);
this->swap(__tmp);
+ return *this;
}
/**
@@ -1884,7 +1881,7 @@ namespace regex_constants
* @brief Gets the offset of the beginning of the indicated submatch.
* @param sub indicates the submatch.
*
- * This function returns the offset from the beginnig of the target
+ * This function returns the offset from the beginning of the target
* sequence to the beginning of the submatch, unless the value of @p sub
* is zero (the default), in which case this function returns the offset
* from the beginning of the target sequence to the beginning of the
@@ -1995,8 +1992,7 @@ namespace regex_constants
_Out_iter
format(_Out_iter __out, const string_type& __fmt,
regex_constants::match_flag_type __flags
- = regex_constants::format_default) const
- { return __out; }
+ = regex_constants::format_default) const;
/**
* @todo Implement this function.
@@ -2088,7 +2084,7 @@ namespace regex_constants
inline void
swap(match_results<_Bi_iter, _Allocator>& __lhs,
match_results<_Bi_iter, _Allocator>& __rhs)
- { return __lhs.swap(__rhs); }
+ { __lhs.swap(__rhs); }
// [7.11.2] Function template regex_match
/**
@@ -2120,8 +2116,7 @@ namespace regex_constants
match_results<_Bi_iter, _Allocator>& __m,
const basic_regex<_Ch_type, _Rx_traits>& __re,
regex_constants::match_flag_type __flags
- = regex_constants::match_default)
- { return false; }
+ = regex_constants::match_default);
/**
* @brief Indicates if there is a match between the regular expression @p e
@@ -2262,8 +2257,7 @@ namespace regex_constants
match_results<_Bi_iter, _Allocator>& __m,
const basic_regex<_Ch_type, _Rx_traits>& __re,
regex_constants::match_flag_type __flags
- = regex_constants::match_default)
- { return false; }
+ = regex_constants::match_default);
/**
* Searches for a regular expression within a range.
@@ -2396,8 +2390,7 @@ namespace regex_constants
const basic_regex<_Ch_type, _Rx_traits>& __e,
const basic_string<_Ch_type>& __fmt,
regex_constants::match_flag_type __flags
- = regex_constants::match_default)
- { return __out; }
+ = regex_constants::match_default);
/**
* @doctodo