Boost logo

Boost :

From: Markus Schöpflin (schoepflin_at_[hidden])
Date: 2001-06-27 08:38:06

Hi there,

I'm trying to use regex_match() to get bach the match results but my
compiler (MSVC6 & STLPort4) always complains about not being able to
find right overload when using a debug build.

error C2665: 'regex_match' : none of the 8 overloads can convert
parameter 1 from type 'const class _STLD::basic_string<char,struct
std::char_traits<char>,class _STLD::allocator<char> >'

The code looks as follows:

#include <boost/regex.hpp>
#include <string>

using boost::regex;
using boost::regex_match;
using boost::cmatch;

        const regex lic_syntax("(foobar)");

bool lic_check_syntax(const std::string &lic)
        return regex_match(lic, lic_syntax);

bool lic_check_license(const std::string &lic)
        cmatch lic_matches;

        if (regex_match(lic, lic_matches, lic_syntax))
                // ...
                return false;

The first use of regex_match() compiles ok, the second one gives me
the error message about the missing overload. In release build all
works as expected...

Has anyone encountered this problem before?


Boost list run by bdawes at, gregod at, cpdaniel at, john at