is_enum implementation

后端 未结 3 1399
伪装坚强ぢ
伪装坚强ぢ 2021-02-05 07:44

I\'m trying to implement std::is_enum. Here is my code so far:

template
struct is_enum {
    static bool value;
};

template

        
3条回答
  •  情深已故
    2021-02-05 08:23

    You problem is that

    template
    

    Is interpreted as unnamed parameter with type forward declared enum named E.
    Semantically same to

    template
    

    Just substituting int with enum E.

提交回复
热议问题