#include <bits/stdc++.h>
using namespace std;
namespace me {
template<typename T>
using void_t = void;
template<typename T, typename = void>
struct val {
constexpr static bool flag = false;
};
template<typename T>
struct val<T, void_t<decltype(declval<T>().first)>> {
constexpr static bool flag = true;
};
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout << boolalpha << me::val<pair<int, int>>::flag << ' ' << me::val<int>::flag << '\n';
return 0;
}静态反射初步
文章信息与版本
文章信息
- 发布
- 2026年3月15日
- 收录
- 2026年3月15日
- 更新
- 2026年11月7日
- 篇幅
- 约 1 分钟