Book a Demo

Author Topic: Smart pointers C++  (Read 4061 times)

rayburgemeestre

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Smart pointers C++
« on: February 12, 2019, 09:55:41 pm »
Hi guys,

I just installed the latest EA 14 and I have one question.
Trying to import my code base I see that there are no associations created when I have attributes in smart pointers.

class X {
private:
  std::shared_ptr<Foobar> foo;
};

for example is not detected with a link to the class Foobar.

Is there any way I can make this work?

The release notes for EA13 state C++11 support but this doesn't seem to work?

Cheers,
Ray

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Smart pointers C++
« Reply #1 on: February 13, 2019, 02:21:14 pm »
Configure | Model | Options | Source Code Engineering | C++

Add std::shared_ptr<#TYPE#> to 'Wrapper Classes'.

C++11 support is about new syntax introduced in that version of C++. It's not about any particular library.

rayburgemeestre

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Smart pointers C++
« Reply #2 on: February 13, 2019, 11:57:15 pm »
Thanks a bunch!

Good to know about this option..

I do think making these entries std::shared_ptr etc. by default might be a good idea since they are part of the standard library.
And most people use them as such in their code bases these days.

Thanks again,
Ray