135#error "UGMISC_DOCS must be defined for documenting, not compiling."
149#define UGMISC_PREDEFS_HEADER "quoted_header_name"
151#ifdef UGMISC_PREDEFS_HEADER
152# include UGMISC_PREDEFS_HEADER
162#if __cplusplus >= 202002L
163# define UGMISC_CXX_20 __cplusplus
168#if __cplusplus < 201703L
169# error "features.hpp doesn't bother to work with less than C++17."
181#define UGMISC_HAVE_VERSION
184# if __has_include(<version>)
187#elif defined(UGMISC_HAVE_VERSION)
192# define UGMISC_HAS_INCLUDE_OR_IGNORE(...) __has_include(__VA_ARGS__)
194# define UGMISC_HAS_INCLUDE_OR_IGNORE(...)
208#define UGMISC_FEATURE_TRUE true
209#define UGMISC_FEATURE_FALSE false
268# define UGMISC_HAVE_CONSTEXPR_DESTRUCTORS
275# define UGMISC_NO_CONSTEXPR_DESTRUCTORS
291#if defined(UGMISC_HAVE_CONSTEXPR_DESTRUCTORS) && defined(UGMISC_NO_CONSTEXPR_DESTRUCTORS)
292# error "Predefines include HAVE_CONSTEXPR_DESTRUCTORS and NO_CONSTEXPR_DESTRUCTORS."
294#if !defined(UGMISC_HAVE_CONSTEXPR_DESTRUCTORS) && !defined(UGMISC_NO_CONSTEXPR_DESTRUCTORS)
296# define UGMISC_HAVE_CONSTEXPR_DESTRUCTORS
298# undef UGMISC_HAVE_CONSTEXPR_DESTRUCTORS
301#ifdef UGMISC_HAVE_CONSTEXPR_DESTRUCTORS
315# define UGMISC_HAVE_CONCEPTS
318# define UGMISC_HAVE_CONCEPTS
319 static constexpr bool concepts = UGMISC_FEATURE_TRUE;
321# undef UGMISC_HAVE_CONCEPTS
326 static constexpr bool concepts = UGMISC_FEATURE_FALSE;
337# define UGMISC_HAVE_CONDITIONAL_TRIVIALS
339#if __cpp_concepts >= 202002L
340# define UGMISC_HAVE_CONDITIONAL_TRIVIALS
343# undef UGMISC_HAVE_CONDITIONAL_TRIVIALS
359# define UGMISC_HAVE_CONSTEVAL
362# define UGMISC_HAVE_CONSTEVAL
365# undef UGMISC_HAVE_CONSTEVAL
379# define UGMISC_HAVE_CONSTEVAL_IF
385#if __cpp_consteval >= 202211L
386# define UGMISC_HAVE_CONSTEVAL_IF
387 static constexpr bool consteval_if = UGMISC_FEATURE_TRUE;
389# undef UGMISC_HAVE_CONSTEVAL_IF
408# define UGMISC_HAVE_BIT_CAST
416#if __cpp_lib_bit_cast
417# define UGMISC_HAVE_BIT_CAST
418 static constexpr bool bit_cast = UGMISC_FEATURE_TRUE;
420# undef UGMISC_HAVE_BIT_CAST
421 static constexpr bool bit_cast = UGMISC_FEATURE_FALSE;
432#define UGMISC_HAVE_BITOPS
435# define UGMISC_HAVE_BITOPS
436 static constexpr bool bitops = UGMISC_FEATURE_TRUE;
438# undef UGMISC_HAVE_BITOPS
443 static constexpr bool bitops = UGMISC_FEATURE_FALSE;
454# define UGMISC_HAVE_CONSTEXPR_SWAP_ALGORITHMS
456#if __cpp_lib_constexpr_swap_algorithms
457# define UGMISC_HAVE_CONSTEXPR_SWAP_ALGORITHMS
460# undef UGMISC_HAVE_CONSTEXPR_SWAP_ALGORITHMS
476# define UGMISC_HAVE_UNREACHABLE
478#if __cpp_lib_unreachable
479# define UGMISC_HAVE_UNREACHABLE
480# define UGMISC_UNREACHABLE std::unreachable();
481 static constexpr bool unreachable = UGMISC_FEATURE_TRUE;
488# undef UGMISC_HAVE_UNREACHABLE
498#ifdef UGMISC_HAVE_UNREACHABLE
499# define UGMISC_unreachable std::unreachable
502# define UGMISC_unreachable ::ugmisc::unreachable
503[[noreturn]]
inline void unreachable() { }
514#ifdef UGMISC_HAVE_CONCEPTS
515# define UGMISC_USE_CONCEPT_DECLS
517# undef UGMISC_USE_CONCEPT_DECLS
Definition features.hpp:252
static constexpr bool bit_cast
Definition features.hpp:421
static constexpr bool consteval_if
Definition features.hpp:390
static constexpr bool conditional_trivials
Definition features.hpp:348
static constexpr bool constexpr_destructors
Definition features.hpp:302
static constexpr bool bitops
Definition features.hpp:443
static constexpr bool unreachable
Definition features.hpp:487
static constexpr bool consteval_functions
Definition features.hpp:370
static constexpr bool concepts
Definition features.hpp:326
static constexpr bool constexpr_swap_algorithms
Definition features.hpp:465