Iros
Loading...
Searching...
No Matches
make_error.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
di/parser/concepts/parser_context.h
"
4
5
namespace
di::parser
{
6
namespace
detail
{
7
struct
MakeErrorFunction
{
8
template
<
typename
... Args>
9
constexpr
auto
operator()
(
concepts::ParserContext
auto
& context, Args&&... args)
const
{
10
if
constexpr
(
requires
{ context.make_error(util::forward<Args>(args)...); }) {
11
return
context.make_error(util::forward<Args>(args)...);
12
}
else
{
13
return
context.make_error();
14
}
15
}
16
};
17
}
18
19
constexpr
inline
auto
make_error
=
detail::MakeErrorFunction
{};
20
}
di::concepts::ParserContext
Definition
parser_context.h:12
di::parser::detail
Definition
zstring_parser.h:10
di::parser
Definition
zstring_parser.h:9
di::parser::make_error
constexpr auto make_error
Definition
make_error.h:19
parser_context.h
di::parser::detail::MakeErrorFunction
Definition
make_error.h:7
di::parser::detail::MakeErrorFunction::operator()
constexpr auto operator()(concepts::ParserContext auto &context, Args &&... args) const
Definition
make_error.h:9
libs
di
include
di
parser
make_error.h
Generated by
1.13.0