initial check in
This commit is contained in:
45
test.cpp
Normal file
45
test.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
// test.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <iostream>
|
||||
|
||||
#if 0
|
||||
template <class C>
|
||||
class aaa
|
||||
{
|
||||
public: virtual C getC() = 0;
|
||||
};
|
||||
|
||||
template <class C>
|
||||
class ccc : public aaa<C>
|
||||
{
|
||||
public: virtual C getC(){ return 0; }
|
||||
};
|
||||
|
||||
template class ccc<int>;
|
||||
template class ccc<double>;
|
||||
template class ccc<long long>;
|
||||
|
||||
class bbb : public ccc<int>,
|
||||
public ccc<double>,
|
||||
public ccc<long long>
|
||||
{
|
||||
public:
|
||||
// using ccc<int>::getC;
|
||||
virtual int ccc<int>::getC() { return 1; }
|
||||
virtual long long ccc<long long>::getC() { return 1; }
|
||||
virtual double ccc<double>::getC() { return 1; }
|
||||
};
|
||||
#endif
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
// bbb o;
|
||||
// int i = static_cast<aaa<int>*>(&o)->getC();
|
||||
// double d = static_cast<aaa<double>*>(&o)->getC();
|
||||
// long long ll = static_cast<aaa<long long>*>(&o)->getC();
|
||||
std::cout << sizeof( long long ) << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user