Skip to content

Commit

Permalink
try to detect __Has_builtin
Browse files Browse the repository at this point in the history
  • Loading branch information
vittorioromeo committed Apr 5, 2023
1 parent 2ddd980 commit c2eb50e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/SSVOpenHexagon/Utils/TinyVariant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@
#include <initializer_list> // TODO: remove dependency?
#include <new> // TODO: remove dependency?

#if ((__GNUC__ >= 10) || defined(__clang__)) && !defined(_MSC_VER)
#define TINYVARIANT_SUPPORTS_HAS_BUILTIN
#endif

#ifdef TINYVARIANT_SUPPORTS_HAS_BUILTIN
#if __has_builtin(__make_integer_seq)
#define TINYVARIANT_USE_MAKE_INTEGER_SEQ
#elif __has_builtin(__integer_pack)
#define TINYVARIANT_USE_INTEGER_PACK
#else
#define TINYVARIANT_USE_STD_INDEX_SEQUENCE
#endif
#else
#define TINYVARIANT_USE_STD_INDEX_SEQUENCE
#endif

#ifdef TINYVARIANT_USE_STD_INDEX_SEQUENCE
#include <utility>
Expand Down

0 comments on commit c2eb50e

Please sign in to comment.