Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6561607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:36:32+00:00 2026-05-25T13:36:32+00:00

I got the following problem: There is an abstract base class, and two other

  • 0

I got the following problem: There is an abstract base class, and two other abstract classes which virtually inherit from the base class, and as a conclusion have to call the Constructor of it, with all the needed arguments.

But now, I got a “normal” class which does inherit both second order classes, and therefor has to call the baseclass-constructor on its own (as the base class is inherited virtually from both the second order classes), but both of the second order constructors take arguments to pass on to the base class constructor.

Is it possible to somhow implement the constructors in a way that there will be no need to pass those, in that case unused, arguments?

I hope I was able to precisely describe my problem, if there are any questions I will be happy to answer them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:36:33+00:00Added an answer on May 25, 2026 at 1:36 pm

    FINALLY found it.

    § 12.6.2 / 7 [class.base.init]

    The expression-list or braced-init-list in a mem-initializer is used
    to initialize the designated subobject (or, in the case of a
    delegating constructor, the complete class object) according to the
    initialization rules of 8.5 for direct-initialization. The
    initialization performed by each mem-initializer constitutes a
    full-expression. Any expression in a mem-initializer is evaluated as
    part of the full-expression that performs the initialization. A
    mem-initializer where the mem-initializer-id denotes a virtual base
    class is ignored during execution of a constructor of any class that
    is not the most derived class.

    So, pass the arguments. They’ll be ignored anyway. Makes things really simple!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got following problem: (c#) There is some class (IRC bot), which has method,
I'm having the following problem: When I got two labels into each other: <Label
I've got the following two classes in C#: public class MyFirstClass : IMyFirstClass {
I've got a following problem. So there are two lists - each one displays
I have the following problem. I got a class PluginLoader which oversees loading of
I've got the following problem: I have two tables: (simplified) +--------+ +-----------+ | User
I have the following problem: I got a view with two text fields and
I have the following problem: I've got an entity class 'TEntity' and a mesh
i got following problem, i need to build a two checkboxes; where only one
Has the following problem got a name and is there an algorithm to solve

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.