Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8cf3e9ff authored by Steven Moreland's avatar Steven Moreland
Browse files

cpp binder: error if no toString implemented

Now that they are all implemented.

Bug: 259162245
Test: N/A
Change-Id: Ibe63610f480a867641716e91ac85268a069361e5
parent 01f93a9e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -166,6 +166,11 @@ class ToEmptyString {
    enum { value = decltype(_test<_T>(0))::value };
};

template <typename _T>
struct TypeDependentFalse {
    enum { value = false };
};

}  // namespace details

template <typename _T>
@@ -225,7 +230,7 @@ std::string ToString(const _T& t) {
        out << "]";
        return out.str();
    } else {
        return "{no toString() implemented}";
        static_assert(details::TypeDependentFalse<_T>::value, "no toString implemented, huh?");
    }
}