vendredi 4 décembre 2015

In C++ how do we call everything with a valid X(Args...) syntax that execute a function?

In C++, there is a Callable concept as well as the std::is_function type traits. I was wondering how the standard calls X, when the exact expression

X(Args...)

is valid and corresponds to a call (excluding constructors and C macros). For now, I can think of:

  • functions: R(Args...) (with optional const, volatile, &, && qualifiers)
  • function pointers: R(*)(Args...)
  • function references: R(&)(Args...)
  • functors (struct/class with overloaded operator())
  • lambda

My questions:

  1. How does the standard call X?
  2. Did I forgot something in my list?

Aucun commentaire:

Enregistrer un commentaire