Coding Global Background
Coding Global

what do they mean by non inline since c++17 ???

Archived a day ago
47 messages
3 members
Created a month ago
Updated a day ago
Open in Discord
0
Goku
Script Kiddie!
Declaration of a non-inline(since C++17) static data member inside a class definition:

struct S
{
    int n;               // defines S::n
    static int i;        // declares, but does not define S::i
    inline static int x; // defines S::x
};                       // defines S

int S::i;                // defines S::i




what do they mean by non inline since c++17 ???

source : https://cppreference.com/cpp/language/definition
do they mean inline variables are available since c++17 or what exactly ? i don't get it
UnoRouter AI API

Replies (46)