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 6204621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:07:43+00:00 2026-05-24T05:07:43+00:00

This is just a theoretical question. I’ve run into a similar problem in the

  • 0

This is just a theoretical question. I’ve run into a similar problem in the COM world and wondered if this is also applicable in the C++ world. I’m also aware that I could avoid this problem with the Pimpl Idiom.

Suppose I had a class A version 1. I shipped the header file and the library file to the clients.

Then one day, I updated A by adding some functions (which are not virtual and not overloading). Class A is now version 2.

Suppose version 2 was compiled in the same environment and settings as version 1.

My understanding is in the new library file, class A’s size and vtable will not be changed. Also since no overloading functions are added, the clients will not call the wrong function. As a result, users are not required to recompile their code.

Are there any pitfalls for this assumption?

  • 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-24T05:07:44+00:00Added an answer on May 24, 2026 at 5:07 am

    There are no pitfalls that I’m aware. The concept you’re describing is called binary compatibility.

    Because version 2 of class A is still binary compatible (as far as I’m aware) with version 1 of class A, then no recompile is required. The KDE Techbase article has a decent set of guidelines (with examples) to follow for maintaining binary compatibility.

    http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++

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

Sidebar

Related Questions

This is just a theoretical question. It was born from a real problem in
DISCLAIMER: This is not a real-world example. It is just a theoretical question of
this is just theoretical question. I use JDBC with my Java applications for using
This is mostly a theoretical question I'm just very curious about. (I'm not trying
This is a theoretical question as much as a practical one. I just can't
This is a just a theoretical question. I'm at a point of starting to
Is there any way to improve ScrollView performance? This is just a theoretical question
This will be a really theoretical question, just bear with me a bit. I
This just won't work. The problem is that I do not know enough to
This is pure just for interest question, any sort of questions are welcome. So

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.