Author Topic: How to change CC on enum  (Read 3057 times)

Offline asugix

  • Single posting newcomer
  • *
  • Posts: 3
How to change CC on enum
« on: July 21, 2012, 04:36:14 am »
the source :
Code: [Select]
namespace osg {
 class OSG_EXPORT CopyOp
 {
  public:
    enum Options
    {
       SHALLOW_COPY =0,
       DEEP_COPY_OBJECTS = 1<<0,
       DEEP_COPY_NODES = 1<<1
    };
 };
 class myObj
 {
   myObj(const CopyOp& copyop=CopyOp::SHALLOW_COPY);
 };
}
Currently when I type
Code: [Select]
new myObj(CopyOp::| ) There is no suggestion for enum values. But there is the suggestion for enum name.
So, by using aid of CC, I can make code like :
Code: [Select]
new myObj(CopyOp::Options.DEEP_COPY_OBJECTS);
This is work on C#, but not work for C++. How to make CC parse enum values after class name? so the aid like:
Code: [Select]
new myObj(CopyOp::DEEP_COPY_OBJECTS);

Thank you

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11786
    • Travis build status
Re: How to change CC on enum
« Reply #1 on: July 21, 2012, 09:48:52 am »
Currently this is a limitation of the CC and it supports only c++11 strong type like enums.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline asugix

  • Single posting newcomer
  • *
  • Posts: 3
Re: How to change CC on enum
« Reply #2 on: July 22, 2012, 11:12:33 pm »
well. The C++11 like enums is better anyway.  :-\

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11786
    • Travis build status
Re: How to change CC on enum
« Reply #3 on: July 22, 2012, 11:31:27 pm »
If your project and compiler are c++11 ready, yes.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]