regex_traits

template<class charT, class implementationT = sensible_default_choice>
struct regex_traits : public implementationT
namespace boost{

template <class charT, class implementationT = sensible_default_choice>
struct regex_traits : public implementationT
{
   regex_traits() : implementationT() {}
};

template <class charT>
struct c_regex_traits;

template <class charT>
class cpp_regex_traits;

template <class charT>
class w32_regex_traits;

} // namespace boost

説明

regex_traits クラスは以下のいずれかである、実装クラスの薄いラッパである。

  • c_regex_traits:このクラスは非推奨である。C ロカールをラップし、Win32 以外のプラットフォームで C++ ロカールが利用不能な場合に使用される。

  • cpp_regex_traits:非 Win32 プラットフォームにおける既定の特性クラスである。正規表現クラスのロカールを変更するのに std::locale インスタンスが使用可能である。

  • w32_regex_traits:Win32 プラットフォームにおける既定の特性クラスである。正規表現クラスのロカールを変更するのに LCID が使用可能である。

既定の動作は boost/regex/user.hpp にある以下の設定マクロのいずれかを定義することで変更可能である。

  • BOOST_REGEX_USE_C_LOCALEc_regex_traits が既定となる。

  • BOOST_REGEX_USE_CPP_LOCALEcpp_regex_traits が既定となる。

これらの特性クラスは特性クラスの要件を満たす。