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