Check if a type is from a particular namespace

前端 未结 3 1216
你的背包
你的背包 2020-12-02 18:37

I would like to check if a type is from a particular namespace. Here is what I came up with:

#include 

namespace helper
{
  template 

        
3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 18:49

    std::cout << "I am " << __PRETTY_FUNCTION__ << " function." << std::endl; 
    

    should print

    namespace::class::function.
    

提交回复
热议问题