onqtam | 1da586c | 2016-05-09 19:18:38 +0300 | [diff] [blame] | 1 | #include "in.h"
|
| 2 |
|
onqtam | dab38ba | 2016-05-09 20:56:36 +0300 | [diff] [blame^] | 3 | #include <vector>
|
onqtam | 9cccba7 | 2016-05-09 18:34:14 +0300 | [diff] [blame] | 4 | #include <iostream>
|
| 5 |
|
onqtam | dab38ba | 2016-05-09 20:56:36 +0300 | [diff] [blame^] | 6 | struct myType {};
|
| 7 |
|
| 8 | std::ostream& operator<<(std::ostream& s, const myType&) { s << "myType"; return s; }
|
| 9 |
|
| 10 | template<typename T>
|
| 11 | std::ostream& operator<<(std::ostream& s, const std::vector<T>& in) { s << "vector<T>"; return s; }
|
| 12 |
|
onqtam | 9cccba7 | 2016-05-09 18:34:14 +0300 | [diff] [blame] | 13 | void f() {
|
onqtam | dab38ba | 2016-05-09 20:56:36 +0300 | [diff] [blame^] | 14 | myType a; std::cout << stringify(a) << std::endl;
|
onqtam | 1da586c | 2016-05-09 19:18:38 +0300 | [diff] [blame] | 15 | std::cout << stringify(6) << std::endl;
|
| 16 | std::vector<int> v(5); std::cout << stringify(v) << std::endl;
|
onqtam | 9cccba7 | 2016-05-09 18:34:14 +0300 | [diff] [blame] | 17 | }
|