How are C++ casts implemented?

Viewed 766

The C++ casts static_cast, const_cast, reinterpret_cast have a template-like syntax, e.g.

long foo = 3; 
int bar = static_cast<int>(foo);

I've looked in the Standard, and it says that casts are expressions, not template functions as I thought.

This left me wondering: under the hood, are these casts just templates with privileged status, or are they keywords that happen to borrow the template syntax?

1 Answers
Related