boost::xpressive::swap — 交换两个 basic_regex 对象的内容。
// In header: <boost/xpressive/basic_regex.hpp> template<typename BidiIter> void swap(basic_regex< BidiIter > & left, basic_regex< BidiIter > & right);
![]() |
重要提示 |
---|---|
这是一个浅交换,不进行引用跟踪。 如果你通过引用将一个 basic_regex 对象嵌入到另一个正则表达式中,然后将其内容与另一个 basic_regex 对象交换,则封闭的正则表达式将看不到更改。 这样做是为了确保 swap() 不会抛出异常。 |
参数 |
|
||||
抛出 |
不会抛出异常。 |