how do you do explicit type casts in 11l?
We have a few functions like
defined in String.hpp, but those are all manually defined functions.
But is there an equivalent of static_cast<> in 11l? For example, how could I explicitly cast my Regular Expression match to Bool?
in re.hpp there's
so I guess it's technically doable, or you wouldn't have bothered adding it. But I couldn't figure how to do it.
We have a few functions like
Code:
11l --> cpp
Int("54") --> to_int("54")
Int(54.2) --> to_int(54.2)
But is there an equivalent of static_cast<> in 11l? For example, how could I explicitly cast my Regular Expression match to Bool?
in re.hpp there's
Code:
class Match
{
friend class RegEx;
std::wsmatch m;
public:
explicit operator bool() const {return !m.empty();}
...
}