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

  • Home
  • SEARCH
  • 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 9140191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:29:03+00:00 2026-06-17T09:29:03+00:00

The US Air Force’s JSF C++ coding standard requires that the virtual base class

  • 0

The US Air Force’s JSF C++ coding standard requires that the virtual base class be declared for each derived class that accesses the virtual base.

For example, in the following hierarchy:

  A
 / \
B1  B2
C1  C2
 \ /
  D

… the rule they impose in this standard (AV Rule 88.1, for reference), requires the classes to be declared like so:

class A;
class B1 : virtual A;
class B2 : virtual A;
class C1 : B1, virtual A;
class C2 : B2, virtual A;
class D  : C1, C2, virtual A;

My questions are as follows:

  1. Is this semantically different from only inheriting virtually in the declaration @ B1/B2, and not specifying virtual A at each subsequent class declaration?
  2. If it’s semantically different, why would anyone /want/ to leave it off? It seems silly to me that you’d absolutely have to do this at each layer of inheritance since that adds a potential point of failure.
  • 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-06-17T09:29:04+00:00Added an answer on June 17, 2026 at 9:29 am

    It semantically identical, since each derived class will have exactly one virtual base of type A. Mentio­ning the virtual base explicitly is quite nice, because the most-derived class constructs the virtual base (unlike what happens for non-virtual bases), and the construction order is important to keep in mind when writing the constructors of the derived classes.

    I don’t have a technical answer for (2). You don’t have to do it, but it would be nice if you did. Like calling your parents, I suppose. As with many things, C++ doesn’t force you to be reasonable.

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

Sidebar

Related Questions

I have an AIR application that I'm compiling to mobile. There is an iOS
I have an Air application that lets users import jpg, png and swf files
We have an Air and Flash application that opens a pdf, but many computers
I'm building an app with Adobe AIR that contains a browsing component with mx:HTML
I am developing an AIR application that is supposed to run on desktop and
We have an Adobe Air app that downloads a large amount of images into
Is there a way to force install location when installing an AIR application via
I have issue regarding speed in air. When I jump and move simultaneously that
I've built an AIR application with flash/as3 that has a webcam display on the
I am developing an Air application that interacts with my server. There are plenty

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.