Support Class Library
A set of tools providing classes and utility
result.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include <scl/utils/Result.h>
5 
6 namespace scl{
7  namespace tools{
8  namespace make{
9  template <class T, class E = scl::utils::Placeholder>
10  scl::utils::Result<T, E> ok(const T& value){
11  return scl::utils::Result<T, E>::Ok(value);
12  }
13 
14  template <class T, class E>
16  return scl::utils::Result<T, E>::Err(error);
17  }
18 
19  }
20  }
21 }
decltype(std::cerr) & error(T &&value)
Output a value on stderr and terminate with a line break.
Definition: basic.h:25
Global namespace of the SCL.
Definition: alias.hpp:3
scl::utils::Result< T, E > ok(const T &value)
Definition: result.h:10
Group of factory functions.
Definition: any.h:8
static Result Err(E &&err)
Definition: Result.h:59
scl::utils::Result< T, E > err(const E &error)
Definition: result.h:15
static Result Ok(T &&value)
Definition: Result.h:39