mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
test: wrapping the error message checking in a macro
This commit is contained in:
2 files changed
+296
-275
No files matched your search
@@ -58,11 +58,10 @@ public:
|
||||
|
||||
Type type() const { return m_type; }
|
||||
std::string const& typeName() const { return m_typeName; }
|
||||
template <typename T>
|
||||
bool regex_search(T&& _reg) const
|
||||
bool regex_search(const std::string& _reg) const
|
||||
{
|
||||
if (std::string const* str = boost::get_error_info<errinfo_comment>(*this))
|
||||
return std::regex_search(*str, std::regex(std::forward<T>(_reg)));
|
||||
return std::regex_search(*str, std::regex(_reg));
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user