brintos

brintos / llvm-project-archived public Read only

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