3rdparty
lexy
include
lexy
_detail
detect.hpp
Go to the documentation of this file.
1
// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
2
// SPDX-License-Identifier: BSL-1.0
3
4
#ifndef LEXY_DETAIL_DETECT_HPP_INCLUDED
5
#define LEXY_DETAIL_DETECT_HPP_INCLUDED
6
7
#include <
lexy/_detail/config.hpp
>
8
9
namespace
lexy::_detail
10
{
11
template
<
typename
... Args>
12
using
void_t
=
void
;
13
14
template
<
template
<
typename
...>
typename
Op,
typename
Void,
typename
... Args>
15
struct
_detector
: std::false_type
16
{
17
template
<
typename
Fallback>
18
using
type_or
= Fallback;
19
};
20
template
<
template
<
typename
...>
typename
Op,
typename
... Args>
21
struct
_detector
<Op,
void_t
<Op<Args...>>, Args...> : std::true_type
22
{
23
template
<
typename
Fallback>
24
using
type_or
= Op<Args...>;
25
};
26
27
template
<
template
<
typename
...>
typename
Op,
typename
... Args>
28
constexpr
bool
is_detected
=
_detector
<Op,
void
, Args...>::value;
29
30
template
<
typename
Fallback,
template
<
typename
...>
typename
Op,
typename
... Args>
31
using
detected_or
=
typename
_detector
<Op,
void
, Args...>::template
type_or<Fallback>
;
32
}
// namespace lexy::_detail
33
34
#endif // LEXY_DETAIL_DETECT_HPP_INCLUDED
35
lexy::_detail::is_detected
constexpr bool is_detected
Definition:
detect.hpp:28
config.hpp
lexy::_detail::type_or
std::conditional_t< std::is_void_v< T >, Fallback, T > type_or
Definition:
config.hpp:64
detail::void
j template void())
Definition:
json.hpp:4893
lexy::_detail::_detector
Definition:
detect.hpp:15
lexy::_detail::detected_or
typename _detector< Op, void, Args... >::template type_or< Fallback > detected_or
Definition:
detect.hpp:31
lexy::_detail::void_t
void void_t
Definition:
detect.hpp:12
lexy::_detail::_detector< Op, void_t< Op< Args... > >, Args... >::type_or
Op< Args... > type_or
Definition:
detect.hpp:24
lexy::_detail
Definition:
any_ref.hpp:12
lexy::_detail::_detector::type_or
Fallback type_or
Definition:
detect.hpp:18
behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Dec 13 2024 03:19:16