X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstrings%2Fregmatch.h;h=8d4406a483ac19b01476a3684b73a2bde7a4e094;hb=HEAD;hp=48f65c6df2b2409403762d0a28f067c8c297b07b;hpb=99b9121e2158603372c7313400283b622e6754d8;p=libs%2Fcore.git diff --git a/source/strings/regmatch.h b/source/strings/regmatch.h index 48f65c6..8d4406a 100644 --- a/source/strings/regmatch.h +++ b/source/strings/regmatch.h @@ -3,6 +3,7 @@ #include #include +#include namespace Msp { @@ -16,7 +17,7 @@ part matched by the whole regex. Further groups, if present, indicate parts matched by subregexes. These are ordered from left to right, by the opening parenthesis of the subregex. */ -class RegMatch +class MSPCORE_API RegMatch { public: /** @@ -32,7 +33,7 @@ public: size_type length; //< Length of the match (end-begin) std::string str; //< The part of the string that matched - operator bool() const { return match; } + explicit operator bool() const { return match; } }; private: @@ -65,7 +66,7 @@ public: /** Shorthand for the group() function. */ const Group &operator[](unsigned i) const { return group(i); } - operator bool() const { return !empty(); } + explicit operator bool() const { return !empty(); } }; } // namespace Msp