Small bugfixes
This commit is contained in:
@@ -46,6 +46,8 @@ namespace OpenVulkano
|
||||
template<typename = std::enable_if_t<std::is_copy_assignable_v<T>>>
|
||||
operator T() const { return object; }
|
||||
|
||||
const T& Get() const { return object; }
|
||||
|
||||
operator const T&() const { return object; }
|
||||
|
||||
bool operator ==(const T& other) const { return object == other; }
|
||||
@@ -56,13 +58,14 @@ namespace OpenVulkano
|
||||
bool operator >=(const T& other) const { return object >= other; }
|
||||
bool operator !() const { return !object; }
|
||||
|
||||
template<std::enable_if<std::is_convertible_v<T, bool>>>
|
||||
operator bool() const { return static_cast<bool>(object); }
|
||||
//template<typename = std::enable_if_t<std::is_convertible_v<T, bool>>>
|
||||
operator bool() const requires std::convertible_to<T, bool>
|
||||
{ return static_cast<bool>(object); }
|
||||
|
||||
auto& operator ++() { ++object; Notify(); return *this; }
|
||||
auto& operator --() { --object; Notify(); return *this; }
|
||||
auto& operator ++(int) { object++; Notify(); return *this; }
|
||||
auto& operator --(int) { object--; Notify(); return *this; }
|
||||
T operator ++(int) { T temp = *this; ++object; Notify(); return temp; }
|
||||
T operator --(int) { T temp = *this; --object; Notify(); return temp; }
|
||||
|
||||
auto& operator +=(const T& other) { object += other; Notify(); return *this; }
|
||||
auto& operator -=(const T& other) { object -= other; Notify(); return *this; }
|
||||
|
||||
Reference in New Issue
Block a user