| 1 |
|
| 2 |
template <typename F> struct A{}; |
| 3 |
|
| 4 |
template <typename Ret, typename C, typename... Args> struct A<Ret ( C::*)(Args...) noexcept> { static constexpr int value = 0; }; |
| 5 |
template <typename Ret, typename C, typename... Args> struct A<Ret (__vectorcall C::*)(Args...) noexcept> { static constexpr int value = 1; }; |
| 6 |
|
| 7 |
template <typename F> constexpr int A_v = A<F>::value; |
| 8 |
|
| 9 |
struct B |
| 10 |
{ |
| 11 |
void f() noexcept {} |
| 12 |
void __vectorcall g() noexcept {} |
| 13 |
}; |
| 14 |
|
| 15 |
int main() |
| 16 |
{ |
| 17 |
return A_v<decltype(&B::f)> + A_v<decltype(&B::g)>; |
| 18 |
} |