Book a Demo

Author Topic: C++11 Reverse engineering  (Read 2877 times)

Siegfried Walz

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
C++11 Reverse engineering
« on: September 17, 2013, 04:11:36 pm »
I added C++11 code (as far as supported by Visual Studio 2010) to my project and would like to reverse/roundtrip engineer that code. But EA terminates the reverse engineering with an error message.
My idea was to add a new language "C++11" as described in "Grammar Editor". For code generation I copied the macros from "C++" to my new language. For reverse engineering I hoped to profit by an existing nBNF grammar of C++. However, the C++ grammar seems to be hidden.

Does anyone use C++11 in combination with EA 10.x and could give an advice how to use reverse engineering ?


Stripped test code:

// Testclass 1
// a) RValue references (N2118)
class CTest1 {
public:
      CTest1() :      m_Value(-1) {}
      CTest1(int v) : m_Value(v) {}

      CTest1(CTest1 &&);             // Move constructor. EA -> error
      CTest1 & operator=(CTest1 &&); // Move assignment. EA -> error

      virtual ~CTest1() {}

      void     setValue(int v) { m_Value = v; }

private:
      CTest1(const CTest1 &);
      CTest1 & operator= (const CTest1 &);
      int      m_Value;
};