Page 1 of 1

Which ANSI C++ Standard?

PostPosted: Thu Sep 06, 2018 10:14 am
by william.jehle@gtri.gatech.edu
Which ANSI C++ standard does MD 18.4 work with?
I think my source code uses a more recent ANSI C++ standard. Doing a little investigation it appears to be ISO/IEC 14882:2011

I am using MD ver 18.4 to do some round trip engineering and have a problem.

Reverse cpp...
Code: Select all
class DEF {
  ...
  virtual ABC_ENUM getABC();
  ...
}

class ABC : DEF {
  ...
  ABC_ENUM getABC() override; // THIS LINE GIVES AN ERROR
  ABC_ENUM getABC(); //override; DOES NOT GIVE AN ERROR
  ...
}


I get three errors before parsing stops...
unexpected token: ABC_ENUM
unexpected token: getABC
unexpected token: (

Re: Which ANSI C++ Standard?

PostPosted: Sun Sep 09, 2018 6:16 pm
by bhoomchai
MD C++ code engineer works with ISO/IEC 14882:2003 aka C++03 which is one version older then what you're using.

Re: Which ANSI C++ Standard?

PostPosted: Thu Sep 20, 2018 9:40 am
by william.jehle@gtri.gatech.edu
As I dig deeper into round-trip engineering with my C++ 2011 code, the limitations imposed by MD18.4 and C++ 2003 are becoming more difficult to resolve.

I need a way to Reverse C++ code into the model without having to edit the code. Mainly, I would have to edit the source code to remove or comment out a keyword. Recall from my first example that the keyword override was causing a parser error. My latest issue is with this C++ 2011 declaration of an enumeration:
Code: Select all
enum class I_AM_AN_ENUM { VALUE1, VALUE2, VALUE3 };


I wish I could tell MD to interpret enum class as if it were just enum. Likewise, I'd like for MD to just ignore override.

Any suggestions or other possible fixes?
Bill