17 #ifndef OBOE_RESULT_WITH_VALUE_H 18 #define OBOE_RESULT_WITH_VALUE_H 20 #include "oboe/Definitions.h" 88 explicit operator bool()
const {
return mError == oboe::Result::OK; }
100 bool operator !()
const {
return mError != oboe::Result::OK; }
124 static_assert(std::is_arithmetic<T>::value,
125 "createBasedOnSign can only be called for numeric types (int or float)");
127 if (numericResult >= 0){
142 template <
typename T>
143 std::ostream& operator<<(std::ostream &strm, const ResultWithValue<T> &result) {
147 strm << result.value();
155 #endif //OBOE_RESULT_WITH_VALUE_H T value() const
Definition: ResultWithValue.h:81
ResultWithValue(oboe::Result error)
Definition: ResultWithValue.h:55
static ResultWithValue< T > createBasedOnSign(T numericResult)
Definition: ResultWithValue.h:121
Result
Definition: Definitions.h:140
const char * convertToText(FromType input)
oboe::Result error() const
Definition: ResultWithValue.h:73
ResultWithValue(T value)
Definition: ResultWithValue.h:64
Definition: AudioStream.h:29
bool operator!() const
Definition: ResultWithValue.h:100
Definition: ResultWithValue.h:47