* Constructs a basic regular expression that does not match any
* character sequence.
*/
- basic_regex()
+ basic_regex() noexcept
: _M_flags(ECMAScript), _M_loc(), _M_automaton(nullptr)
{ }
* expression.
*/
unsigned int
- mark_count() const
+ mark_count() const noexcept
{
if (_M_automaton)
return _M_automaton->_M_sub_count() - 1;
* or in the last call to assign().
*/
flag_type
- flags() const
+ flags() const noexcept
{ return _M_flags; }
// [7.8.5] locale
* object.
*/
locale_type
- getloc() const
+ getloc() const noexcept
{ return _M_loc; }
// [7.8.6] swap
* @param __rhs Another regular expression object.
*/
void
- swap(basic_regex& __rhs)
+ swap(basic_regex& __rhs) noexcept
{
std::swap(_M_flags, __rhs._M_flags);
std::swap(_M_loc, __rhs._M_loc);
template<typename _Ch_type, typename _Rx_traits>
inline void
swap(basic_regex<_Ch_type, _Rx_traits>& __lhs,
- basic_regex<_Ch_type, _Rx_traits>& __rhs)
+ basic_regex<_Ch_type, _Rx_traits>& __rhs) noexcept
{ __lhs.swap(__rhs); }
};
protected:
- explicit _State_base(_Opcode __opcode)
+ explicit _State_base(_Opcode __opcode) noexcept
: _M_opcode(__opcode), _M_next(_S_invalid_state_id)
{ }
public:
bool
- _M_has_alt()
+ _M_has_alt() const noexcept
{
return _M_opcode == _S_opcode_alternative
|| _M_opcode == _S_opcode_repeat
"std::function<bool(char)>");
explicit
- _State(_Opcode __opcode) : _State_base(__opcode)
+ _State(_Opcode __opcode) noexcept : _State_base(__opcode)
{
if (_M_opcode() == _S_opcode_match)
new (this->_M_matcher_storage._M_addr()) _MatcherT();
_MatcherT(__rhs._M_get_matcher());
}
- _State(_State&& __rhs) : _State_base(__rhs)
+ _State(_State&& __rhs) noexcept : _State_base(__rhs)
{
if (__rhs._M_opcode() == _S_opcode_match)
new (this->_M_matcher_storage._M_addr())
// Since correct ctor and dtor rely on _M_opcode, it's better not to
// change it over time.
_Opcode
- _M_opcode() const
+ _M_opcode() const noexcept
{ return _State_base::_M_opcode; }
bool
{ return _M_get_matcher()(__char); }
_MatcherT&
- _M_get_matcher()
+ _M_get_matcher() noexcept
{ return *static_cast<_MatcherT*>(this->_M_matcher_storage._M_addr()); }
const _MatcherT&
- _M_get_matcher() const
+ _M_get_matcher() const noexcept
{
return *static_cast<const _MatcherT*>(
this->_M_matcher_storage._M_addr());
typedef regex_constants::syntax_option_type _FlagT;
explicit
- _NFA_base(_FlagT __f)
+ _NFA_base(_FlagT __f) noexcept
: _M_flags(__f), _M_start_state(0), _M_subexpr_count(0),
_M_has_backref(false)
{ }
public:
_FlagT
- _M_options() const
+ _M_options() const noexcept
{ return _M_flags; }
_StateIdT
- _M_start() const
+ _M_start() const noexcept
{ return _M_start_state; }
_SizeT
- _M_sub_count() const
+ _M_sub_count() const noexcept
{ return _M_subexpr_count; }
_GLIBCXX_STD_C::vector<size_t> _M_paren_stack;