Initiation of a specific designer к C+++



  • Can a specific designer be inherited using a declaration? We can do the following in succession:

    using myclass::myclass;
    

    But in that case, all the designers will be inherited, can only be inherited by a copying designer, for example, or will it have to be clearly written in the class?



  • No, it's not possible to inherit specific designs by using-declaration: http://open-std.org/jtc1/sc22/wg21/docs/papers/2020/n4868.pdf#section.9.9 doesn't describe this syntax. All together.

    If you need to inherit only specific designers, you're gonna have to write every design you need, and you're gonna have to call a base class designer using it. https://docs.microsoft.com/en-us/cpp/cpp/delegating-constructors?view=msvc-160




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2