Debian Codegraph @

yo/advancedtemplates/examples/conversion.cc

raw
1 #include <iostream>
2 #include <fstream>
3 #include <string>
4 #include "conversion.h"
5
6 using namespace std;
7
8 int main()
9 {
10 //CONVERSION
11 cout <<
12 LconvertibleToR<ofstream, ostream>::yes << " " <<
13 LconvertibleToR<ostream, ofstream>::yes << " " <<
14 LconvertibleToR<int, double>::yes << " " <<
15 LconvertibleToR<int, string>::yes <<
16 "\n";
17 //=
18
19 cout << "\n" <<
20 LconvertibleToR<int, int>::sameType << " " <<
21 LconvertibleToR<int, string>::sameType <<
22 "\n";
23
24 //INHERITANCE
25 cout << "\n" <<
26 "1: " << LBaseRDerived<ofstream, ostream>::yes << ", " <<
27 "2: " << LBaseRDerived<ostream, ofstream>::yes << ", " <<
28 "3: " << LBaseRDerived<void, ofstream>::yes << ", " <<
29 "4: " << LBaseRDerived<ostream, ostream>::yes << ", " <<
30 "5: " << LBaseRtrulyDerived<ostream, ostream>::yes <<
31 "\n";
32 //=
33 }