wrong number of template arguments for "char_regex_traits_i"

Hello , I include <boost/regex.hpp> in my program, when compiling I got message: boost/regex/v4/char_regex_traits.hpp:34: error: wrong number of template arguments (1, should be 2). I checked the wrong line in boost/regex/v4/char_regex_traits.hpp .. template <calss charT> class char_regex_traits_i : public regex_traits<charT>{}; template<> class char_regex_traits_i<char> : public regex_traits<char> { public: typedef char char_type; typedef unsigned char uchar_type; typedef unsigned int size_type; typedef regex_traits<char> base_type; }; and then I checked the template regex_traits defined in boost/regex/v4/regex_traits.hpp: template <class charT, class implementationT > struct regex_traits : public implementationT { regex_traits() : implementationT() {} }; It's really a but, do you thinks so? what should the implementationT be for char_regex_traits_i in boost/regex/v4/char_regex_traits.hpp? Who could give some suggession, thanks! -- ------------------------------- Enjoy life! Barco You

Barco You wrote:
Hello , I include <boost/regex.hpp> in my program, when compiling I got message:
boost/regex/v4/char_regex_traits.hpp:34: error: wrong number of template arguments (1, should be 2).
I've never seen that before: what compiler/platform are you using?
I checked the wrong line in boost/regex/v4/char_regex_traits.hpp .. template <calss charT> class char_regex_traits_i : public regex_traits<charT>{};
template<> class char_regex_traits_i<char> : public regex_traits<char> { public: typedef char char_type; typedef unsigned char uchar_type; typedef unsigned int size_type; typedef regex_traits<char> base_type;
};
and then I checked the template regex_traits defined in boost/regex/v4/regex_traits.hpp:
template <class charT, class implementationT > struct regex_traits : public implementationT { regex_traits() : implementationT() {} };
It's really a but, do you thinks so?
what should the implementationT be for char_regex_traits_i in boost/regex/v4/char_regex_traits.hpp?
The second template argument to regex_traits is defaulted in regex_fwd.hpp: #ifdef BOOST_REGEX_USE_WIN32_LOCALE template <class charT, class implementationT = w32_regex_traits<charT> > struct regex_traits; #elif defined(BOOST_REGEX_USE_CPP_LOCALE) template <class charT, class implementationT = cpp_regex_traits<charT> > struct regex_traits; #else template <class charT, class implementationT = c_regex_traits<charT> > struct regex_traits; #endif But you shouldn't need to know that: the second argument is an implementation detail. Regards, John.
participants (2)
-
Barco You
-
John Maddock