Which ANSI C++ Standard?

General discussions about code engineering

Moderator: Moderators

Which ANSI C++ Standard?

Postby william.jehle@gtri.gatech.edu » Thu Sep 06, 2018 10:14 am

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: (
william.jehle@gtri.gatech.edu
Forum Beginner
Forum Beginner
 
Posts: 47
Posts Rating:2
Joined: Wed Jul 24, 2013 10:24 am

Re: Which ANSI C++ Standard?

Postby bhoomchai » Sun Sep 09, 2018 6:16 pm

MD C++ code engineer works with ISO/IEC 14882:2003 aka C++03 which is one version older then what you're using.
bhoomchai
Customer Support
Customer Support
 
Posts: 36
Posts Rating:5
Joined: Thu Jan 21, 2010 12:38 am

Re: Which ANSI C++ Standard?

Postby william.jehle@gtri.gatech.edu » Thu Sep 20, 2018 9:40 am

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
william.jehle@gtri.gatech.edu
Forum Beginner
Forum Beginner
 
Posts: 47
Posts Rating:2
Joined: Wed Jul 24, 2013 10:24 am


Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests