template argument deduction with strongly-typed enumerations

前端 未结 4 1193
迷失自我
迷失自我 2020-12-13 14:11

If I have a normal (weak) enumeration, I can use its enumerated values as non-type template parameters, like so:

enum { Cat, Dog, Horse };

template 

        
4条回答
  •  我在风中等你
    2020-12-13 14:41

    I'm sorry, I have to tell you that

    It is not possible

    Take the macro, put it into a scary named header and protect it from your colleague's cleanup script. Hope for the best.

提交回复
热议问题