20 #ifndef KERNEL_UTILITIES_RESULT_H 21 #define KERNEL_UTILITIES_RESULT_H 23 #include "pedigree/kernel/utilities/assert.h" 24 #include "pedigree/kernel/utilities/utility.h" 35 template <
class T,
class E>
49 const T &value()
const 55 const E &error()
const 74 Result(
const T &v) : m_Value(v), m_Error(), m_HasError(
false)
79 : m_Value(m_DefaultValue), m_Error(e), m_HasError(
true)
87 typedef typename pedigree_std::remove_reference<T>::type BaseValueType;
88 static const BaseValueType m_DefaultValue;
91 template <
class T,
class E>
92 const typename Result<T, E>::BaseValueType
95 #endif // KERNEL_UTILITIES_RESULT_H