mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-02 11:47:56 +08:00
28 lines
479 B
C++
28 lines
479 B
C++
#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>
|
|
{
|
|
};
|
|
} // namespace v1
|
|
} // namespace api
|
|
int main()
|
|
{
|
|
api::v1::hh h;
|
|
std::cout << h.className() << std::endl;
|
|
std::cout << api::v1::hh::classTypeName() << std::endl;
|
|
h.p();
|
|
}
|