Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <type_traits>
- struct X {};
- struct Y {};
- struct Z { Z(const X&); Z(const Y&); };
- X f(Z, Z);
- template<class T, class U>
- auto f(T t, U u) -> typename std::common_type<T, U>::type;
- int main() {
- // std::common_type<X, Y>::type;
- X x;
- Y y;
- f(x, y);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement