drogon/tests/ClassNameTest.cc

25 lines
515 B
C++
Raw Normal View History

2018-08-08 17:58:43 +08:00
#include <drogon/DrObject.h>
#include <iostream>
namespace api{
namespace v1{
template <typename T>
class handler:public drogon::DrObject<T>
{
public:
static void p(){
std::cout<<handler<T>::classTypeName()<<std::endl;
}
};
class hh:public handler<hh>
{
};
}
}
int main()
{
api::v1::hh h;
std::cout<<h.className()<<std::endl;
std::cout<<api::v1::hh::classTypeName()<<std::endl;
h.p();
}