12#ifndef CXXUTILS_FEATURES_H
13#define CXXUTILS_FEATURES_H
15#if __has_include( <features.h> )
18#if __has_include( <version> )
25# define __GLIBC_PREREQ(MAJOR, MINOR) 0
30#if (defined(__GNUC__) || defined(__clang__)) && \
31 !(defined(__ICC) || defined(__COVERITY__) || \
32 defined(__CUDACC__) || defined(__CLING__))
33# define HAVE_GCC_CLANG_EXTENSIONS 1
35# define HAVE_GCC_CLANG_EXTENSIONS 0
40#if HAVE_GCC_CLANG_EXTENSIONS && \
41 (defined(__i386__) || defined(__x86_64__)) && defined(__ELF__) && \
42 !defined(__HIP__) && !defined(CL_SYCL_LANGUAGE_VERSION) && \
43 !defined(SYCL_LANGUAGE_VERSION)
44#define HAVE_FUNCTION_MULTIVERSIONING 1
46# define HAVE_FUNCTION_MULTIVERSIONING 0
54#if HAVE_FUNCTION_MULTIVERSIONING && !(defined(__clang__) && __clang_major__ < 14)
55# define HAVE_TARGET_CLONES 1
57# define HAVE_TARGET_CLONES 0
61#if HAVE_GCC_CLANG_EXTENSIONS && !defined(__clang__)
62# define HAVE_GCC_INTRINSICS 1
64# define HAVE_GCC_INTRINSICS 0
77#if HAVE_GCC_CLANG_EXTENSIONS
78# define HAVE_BITCOUNT_INTRINSICS 1
80# define HAVE_BITCOUNT_INTRINSICS 0
85#if HAVE_GCC_CLANG_EXTENSIONS
86# define HAVE_VECTOR_SIZE_ATTRIBUTE 1
88# define HAVE_VECTOR_SIZE_ATTRIBUTE 0
94#if HAVE_VECTOR_SIZE_ATTRIBUTE && (defined(__clang__) || (__GNUC__ >= 9))
95# define HAVE_CONVERT_VECTOR 1
97# define HAVE_CONVERT_VECTOR 0
102# if __GLIBC_PREREQ(2, 33)
103# define HAVE_MALLINFO2 1
105# define HAVE_MALLINFO2 0
110#if !__GLIBC_PREREQ(2, 34)
111# define HAVE_MALLOC_HOOKS 1
113# define HAVE_MALLOC_HOOKS 0
117#if defined(__GLIBC__)
118# define HAVE_FEENABLEEXCEPT 1
120# define HAVE_FEENABLEEXCEPT 0
125# define HAVE_STD_RANGES 1
127# define HAVE_STD_RANGES 0
Some additional feature test macros.