3 ms·
could you provide the type of this map function ? auto map(auto x) { if constexpr(is_same<decltype(x), int>) { struct T1 { int getStuff() { r
by jcelerier 7y ago
could you provide the type of this map function ?
auto map(auto x) {
if constexpr(is_same<decltype(x), int>) {
struct T1 { int getStuff() { return 0; } };
return T1 {};
} else {
struct T2 { void doStuff() { } };
return T2 {};
}
}
- asdkjh345fd 7y agoRead the rest of the discussion.