VCTR
Loading...
Searching...
No Matches
vctr::RequireConstexpr< v > Struct Template Reference

A helper struct intended to check if a value is a constexpr. More...

Detailed Description

template<auto v>
struct vctr::RequireConstexpr< v >

A helper struct intended to check if a value is a constexpr.

This is most useful to check if a member variable is compile time constant or the return value of a member function is compile time constant. Example:

if constexpr (requires { typename RequireConstexpr<T::member>; })
{
constexpr auto m = T::member;
// Treat it as a compile time constant
}
A helper struct intended to check if a value is a constexpr.
Definition: Traits.h:279

The documentation for this struct was generated from the following file: