|
@@ -20,6 +20,7 @@ template <class T> class Result
|
20
|
20
|
{
|
21
|
21
|
public:
|
22
|
22
|
Result();
|
|
23
|
+ Result(const Result<T>& other);
|
23
|
24
|
|
24
|
25
|
static const Result<T> ok(const T& data);
|
25
|
26
|
static const Result<T> strerror();
|
|
@@ -67,6 +68,14 @@ Result<T>::Result()
|
67
|
68
|
{
|
68
|
69
|
}
|
69
|
70
|
|
|
71
|
+template<class T>
|
|
72
|
+Result<T>::Result(const Result<T>& other)
|
|
73
|
+ : _data(other._data)
|
|
74
|
+ , _success(other._success)
|
|
75
|
+ , _error(other._error)
|
|
76
|
+{
|
|
77
|
+}
|
|
78
|
+
|
70
|
79
|
template<class T>
|
71
|
80
|
const Result<T> Result<T>::ok(const T& data)
|
72
|
81
|
{
|