better test casting
This commit is contained in:
parent
398fdd96da
commit
c5075348e8
@ -43,7 +43,11 @@ class wrapped_int
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
wrapped_int() = default;
|
wrapped_int() = default;
|
||||||
/* implicit */ wrapped_int(T val) : val(val) {}
|
explicit wrapped_int(T val) : val(val) {}
|
||||||
|
|
||||||
|
// allow implicit conversions from anything that `T` allows conversions from
|
||||||
|
template<typename T2, typename = typename std::enable_if<std::is_convertible<T2, T>::value>::type>
|
||||||
|
wrapped_int(T2 val) : val(val) {}
|
||||||
|
|
||||||
bool operator==(const wrapped_int& other) const
|
bool operator==(const wrapped_int& other) const
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user