KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What mechanism is involved, if when returning types, that are constructible from initializer lists, I don't specify the type I am returning, as in: std::array<int, 3> make_array() { return { 1, 2, 3 }; } instead of std::array<int, 3> make_array() { return std::array<int, 3>{ 1, 2, 3 }; } Are there any performance penalties involved, if I return the initializer list without specifying a type? Am I actually returning an array, that is converted into a std::array ?
Tags (comma-separated)
Save Edits
Cancel