Skip to main content
edited tags
Link
Aykhan Hagverdili
  • 30.5k
  • 6
  • 53
  • 108
grammar
Source Link
Boann
  • 50.3k
  • 16
  • 125
  • 153

Has Is the old meaning of the inline keyword deprecated in C++?

InOn the cppreference page for the inline specifier, it says,

The inline specifier, when used in a function's decl-specifier-seq, declares the function to be an inline function.

An inline function has the following properties:
There may be more than one definition of an inline function in the program as long as each definition appears in a different translation unit and all definitions are identical.
...

Then, a bit down, it says,

The original intent of the inline keyword was to serve as an indicator to the optimizer that inline substitution of a function is preferred over function call. ...

Apart from this line, there is no reference to this use of inline. Is the latter meaning of inline is still valid in the C++ standards? Or is the latter form is deprecated over the former?

If the latter form is still valid, is it worth using it in modern compilers? I have heard that, even though it is the compiler that makes the decision about inlining, using the inline keyword pushes it a bit. Is this true? Should I care to use the inline keyword in my program for latter usethis case?

Has old meaning of inline keyword deprecated in C++?

In cppreference page for inline specifier, it says,

The inline specifier, when used in a function's decl-specifier-seq, declares the function to be an inline function.

An inline function has the following properties:
There may be more than one definition of an inline function in the program as long as each definition appears in a different translation unit and all definitions are identical.
...

Then, a bit down, it says,

The original intent of the inline keyword was to serve as an indicator to the optimizer that inline substitution of a function is preferred over function call. ...

Apart from this line, there is no reference to this use of inline. Is the latter meaning of inline is still valid in C++ standards? Or the latter form is deprecated over the former?

If latter form is still valid, is it worth using it in modern compilers? I have heard that, even though it is the compiler that makes the decision about inlining, using inline keyword pushes it a bit. Is this true? Should I care to use inline keyword in my program for latter use case?

Is the old meaning of the inline keyword deprecated in C++?

On the cppreference page for the inline specifier, it says,

The inline specifier, when used in a function's decl-specifier-seq, declares the function to be an inline function.

An inline function has the following properties:
There may be more than one definition of an inline function in the program as long as each definition appears in a different translation unit and all definitions are identical.
...

Then, a bit down, it says,

The original intent of the inline keyword was to serve as an indicator to the optimizer that inline substitution of a function is preferred over function call. ...

Apart from this line, there is no reference to this use of inline. Is the latter meaning of inline still valid in the C++ standards? Or is the latter form deprecated over the former?

If the latter form is still valid, is it worth using it in modern compilers? I have heard that, even though it is the compiler that makes the decision about inlining, using the inline keyword pushes it a bit. Is this true? Should I use the inline keyword in my program for this case?

edited tags
Link
πάντα ῥεῖ
  • 88.9k
  • 13
  • 125
  • 199
Source Link
Loading