di 0.1.0
Loading...
Searching...
No Matches
make_error.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace di::parser {
6namespace 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
19constexpr inline auto make_error = detail::MakeErrorFunction {};
20}
Definition code_point_parser.h:10
constexpr auto make_error
Definition make_error.h:19