Tuesday, October 17, 2017

C++17: Inline variables

C++17 allows inline variables. Here is an example:

inline static int gMyInt;
inline static int gMyInt;

int main()
{
  return 0;
}
Note: the code neither compiles on “gcc version 6.3.0” nor “MSVS 15.3.5”
Reference: https://en.wikipedia.org/wiki/C%2B%2B17

No comments:

Post a Comment