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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:40:40+00:00 2026-05-22T01:40:40+00:00

Using C++ style typecastings (all 4) look exactly like some function template . e.g.

  • 0

Using C++ style typecastings (all 4) look exactly like some function template. e.g.

template<typename TO, typename FROM>
TO dynamic_cast (FROM p);

will be used as,

dynamic_cast<Derived*>(p); // p is Base*

Why is it not allowed to overload them by language standard for custom usage ? (like we can overload the keywords like new/delete or other operators)

  • 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-22T01:40:41+00:00Added an answer on May 22, 2026 at 1:40 am

    Why is it not allowed to overload them by language standard for custom usage?

    I suppose that’s because the standard committee, when introducing these, thought the semantics of all four of these casts are well defined, and applicable to all types they should be. And mostly, this is true.

    The only counter example I know of is the inability to dynamic_cast between smart pointer instances:

    shared_ptr<Derived> pd = dynamic_cast<shared_ptr<Derived> >(pb);
    

    I suppose the ability to do that would have some merits.

    I don’t know whether this has been discussed by the volunteers that did all the work in the standards committee (and I’m too lazy to google), but if it has been discussed (and I’d think so), it’s been rejected either because someone thought the disadvantages outweigh the advantages, or because nobody had found the time to make a decent proposal and shepherd it through.1


    1 Don’t laugh. There’s actually a lot of things most agree would be nice to have, and which are only failing to materialize because nobody could be bothered to do the work of writing a decent proposal, and spending the time needed to discuss and to iteratively improve it until it can be voted on.

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

Sidebar

Related Questions

Is it possible to deny from all apache htaccess style using php. I can't
I create the custom title using the style.I code some from http://labs.makemachine.net/2010/03/custom-android-window-title/ I have
I am using Bird style literate haskell, which requires all code to be like
i'm using css style like this text-align:center; its working in IE and doesn't work
for zooming I am using el.style.zoom = 1.5; el.style.WebkitTransform = 'scale(1.5)'; here e1 will
Using Perl style regexp, is it possible to look for something not of certain
C++ style vs. performance - is using C-style things, that are faster the some
I want to style some fonts in my css using the style- sharp found
I'm trying to add some styles into a page using javascript var style =
I am using the style sheets for the gridview from this link http://www.cyberslingers.com/Sandbox/GridView.aspx It

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.