Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function template swap

boost::xpressive::swap — Swaps the contents of two basic_regex objects.

Synopsis

// In header: <boost/xpressive/basic_regex.hpp>


template<typename BidiIter> 
  void swap(basic_regex< BidiIter > & left, basic_regex< BidiIter > & right);

Description

Parameters:

left

The first basic_regex object.

right

The second basic_regex object.

Throws:

Will not throw.

Notes:

This is a shallow swap that does not do reference tracking. If you embed a basic_regex object by reference in another regular expression and then swap its contents with another basic_regex object, the change will not be visible to the enclosing regular expression. It is done this way to ensure that swap() cannot throw.


PrevUpHomeNext