17#ifndef LLVM_ADT_STLFORWARDCOMPAT_H
18#define LLVM_ADT_STLFORWARDCOMPAT_H
33template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
34inline constexpr T e_v =
T(0x1.5bf0a8b145769P+1);
35template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
37template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
38inline constexpr T ln2_v =
T(0x1.62e42fefa39efP-1);
39template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
40inline constexpr T ln10_v =
T(0x1.26bb1bbb55516P+1);
41template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
42inline constexpr T log2e_v =
T(0x1.71547652b82feP+0);
43template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
45template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
46inline constexpr T pi_v =
T(0x1.921fb54442d18P+1);
47template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
49template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
51template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
52inline constexpr T sqrt2_v =
T(0x1.6a09e667f3bcdP+0);
53template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
55template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
56inline constexpr T sqrt3_v =
T(0x1.bb67ae8584caaP+0);
57template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
59template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
60inline constexpr T phi_v =
T(0x1.9e3779b97f4a8P+0);
82 using type = std::remove_cv_t<std::remove_reference_t<T>>;
103template <
class,
template <
class...>
class Op,
class... Args>
struct detector {
106template <
template <
class...>
class Op,
class... Args>
126template <
template <
class...>
class Op,
class... Args>
133 template <
typename T>
constexpr T &&
operator()(
T &&self)
const noexcept {
134 return std::forward<T>(self);
145template <
class Ptr>
auto to_address(
const Ptr &
P) {
return P.operator->(); }
147 static_assert(!std::is_function_v<T>);
153template <
typename FnT,
typename... ArgsT>
154constexpr std::invoke_result_t<
FnT, ArgsT...>
156 return std::apply(std::forward<FnT>(Fn),
157 std::forward_as_tuple(std::forward<ArgsT>(Args)...));
166template <
typename Optional,
typename Function,
168std::optional<std::invoke_result_t<Function, Value>>
171 return F(*std::forward<Optional>(O));
178template <
typename Enum>
180 return static_cast<std::underlying_type_t<Enum>
>(
E);
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
constexpr double inv_sqrt2
constexpr double inv_sqrt3
constexpr double inv_sqrtpi
This is an optimization pass for GlobalISel generic memory operations.
constexpr from_range_t from_range
constexpr std::invoke_result_t< FnT, ArgsT... > invoke(FnT &&Fn, ArgsT &&...Args)
C++20 constexpr invoke.
constexpr std::underlying_type_t< Enum > to_underlying(Enum E)
Returns underlying integer value of an enum.
DWARFExpression::Operation Op
auto to_address(const Ptr &P)
Returns a raw pointer that represents the same address as the argument.
typename detail::detector< void, Op, Args... >::value_t is_detected
Detects if a given trait holds for some set of arguments 'Args'.
std::optional< std::invoke_result_t< Function, Value > > transformOptional(Optional &&O, Function &&F)
Implement std::hash so that hash_code can be used in STL containers.
constexpr T && operator()(T &&self) const noexcept
std::remove_cv_t< std::remove_reference_t< T > > type