inline question
-
In a template does inline hold the same meaning as when it's used in a class? I.e. the way I understood it in a class it "requests" the compiler to put it inline but the compiler was not required to do so and it was up to the compiler to decide. template inline T const& MyTemplateFunc (T const& a, T const& b) { return a < b ? b:a; }
-
In a template does inline hold the same meaning as when it's used in a class? I.e. the way I understood it in a class it "requests" the compiler to put it inline but the compiler was not required to do so and it was up to the compiler to decide. template inline T const& MyTemplateFunc (T const& a, T const& b) { return a < b ? b:a; }
Quote:
it "requests" the compiler to put it inline but the compiler was not required to do so and it was up to the compiler to decide.
That and more than that. See the documentation (inline specifier - cppreference.com[^]) for the gory details.