mardi 27 septembre 2016

What does the -> notation after the function parenthesis signify? [duplicate]

This question already has an answer here:

For example, in:

  virtual auto create_obj() -> std::unique_ptr<Base>
  {
    return std::unique_ptr<Base>{};
  }

What does -> signify ? Since the return type is specified as auto, why is it necessary ?

Aucun commentaire:

Enregistrer un commentaire