Count on enum C++ automatic

后端 未结 5 1897
北荒
北荒 2020-12-10 09:27

I\'ve come to a pattern when writing enums in C++. It is like this:

class Player
{
public:
    class State
    {
    public:
        typedef enum
        {
          


        
5条回答
  •  萌比男神i
    2020-12-10 09:35

    No there isn't, and if you need this, you probably shouldn't be using an enum in the first place.

    In your particular case, what's a use case where you'd ever want to call Count?

提交回复
热议问题