/* Compile-time valid expression checker for GDB, the GNU debugger.
- Copyright (C) 2017-2020 Free Software Foundation, Inc.
+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
This file is part of GDB.
#define CHECK_VALID_EXPR_INT(TYPENAMES, TYPES, VALID, EXPR_TYPE, EXPR) \
namespace CONCAT (check_valid_expr, __LINE__) { \
\
- template <TYPENAMES> \
- using archetype = decltype (EXPR); \
+ template <TYPENAMES, typename = decltype (EXPR)> \
+ struct archetype \
+ { \
+ }; \
\
- static_assert (gdb::is_detected_exact<EXPR_TYPE, \
+ static_assert (gdb::is_detected_exact<archetype<TYPES, EXPR_TYPE>, \
archetype, TYPES>::value == VALID, \
""); \
} /* namespace */