Jump to content
  • Advertisement
Sign in to follow this  
Shannon Barber

Pedantic C++ Take 3

This topic is 4725 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
I've found a few instances of them informally/incorrectly being refered to as "cast operators", however a "cast operator" would be static_cast<>() and friends (and the C-style cast), as distinct from what you are refering to.

Share this post


Link to post
Share on other sites
I was wondering if anyone would respond cast operators because it's used so much to describe that type of operator. I've seen them called that almost everywhere. Since I was looking for conversion operator, I had trouble tracking down 'conversion function'.

Seems like conversion operator isn't too far off the mark though, but as Andrew notes cast operators really are something else!

Share this post


Link to post
Share on other sites
I call it a cast operator because it is an operator that is called when casting. Just like operator + is called when applying + on an object.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!