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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:29:45+00:00 2026-05-10T19:29:45+00:00

I know that you can use a dummy int parameter on operator++ and operator–

  • 0

I know that you can use a dummy ‘int’ parameter on operator++ and operator-- to override the postfix versions of those operators, but I vaguely recall something about a dummy parameter that you could declare on a destructor. Does anyone know anything about that, and if so, what that dummy parameter did?

This was in my old Turbo C++ tutorial books, which I read when I was a teenager (i.e. a long time ago), so I might be completely misremembering it. That was also very early C++, before it was standardized, so it’s possible that it was something Turbo C++-specific.

  • 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. 2026-05-10T19:29:45+00:00Added an answer on May 10, 2026 at 7:29 pm

    You’re possibly thinking of the placement and nothrow forms of operator delete, which have the signatures:

    void operator delete(void *, void *) throw(); void operator delete(void *, const std::nothrow_t&) throw(); void operator delete[](void *, void *) throw(); void operator delete[](void *, const std::nothrow_t&) throw(); 

    These are never called during normal operation, but would be used in the case where the constructor for an object being constructed with placement new throws an exception. Generally you don’t have to define them, since the compiler already called the destructor(s) on the dead object’s bases and members, and for placement new there’s no memory to be freed. But can exist if you are overloading placement new and need a corresponding operator.

    The second argument is not really used, and just distinguishes the signature for the ordinary:

    void operator delete(void *) 

    These aren’t special dummy arguments the way the operator++ ones are, though. They’re just an instance of the general rule that call to new with extra arguments, such as:

    obj = new(x,y,z) Object(a,b,c)  

    will generate implicit code to clean up from constructor errors that passes those same additional arguments to the operator delete, which will function (approximately) like:

    void *raw = operator new(sizeof(Object), x,y,z) try {     obj = new(raw) Object(a,b,c); } catch(...) {    operator delete(raw,x,y,z);    throw; } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 101k
  • Answers 101k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer On the forms onsubmit event, modify the action attribute to… May 11, 2026 at 8:09 pm
  • Editorial Team
    Editorial Team added an answer When you call byte[].ToString() that just returns System.Byte[]. How were… May 11, 2026 at 8:09 pm
  • Editorial Team
    Editorial Team added an answer Read this Bing API, Version 2.0 - http://msdn.microsoft.com/en-us/library/dd251056.aspx May 11, 2026 at 8:09 pm

Related Questions

I know that you can use a dummy int parameter on operator++ and operator--
I need to make a rather complex query, and I need help bad. Below
I know that you can use a javascript: pseudo protocol for URLs in an
Is it possible to create a toggle button in C# WinForms? I know that
So I have a table as follows: ID_STUDENT | ID_CLASS | GRADE ----------------------------- 1

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.