What is inline data in a class?

1k views Asked by At

In his talk about Designing value classes for modern C++, Marc Mutz mentions the concept of inline data (in the 6th slide, when talking about thin abstractions).

I searched for what that means, but couldn't find anything close to a definition of what inline data is (even in the standard, in which I did not find any mention of "inline data").

I suspect the concept may be akin to inline functions, i.e. when assigning to/reading from it, the compiler optimizes away the overhead that comes with the fact that it's a member of a class, though I'm not sure.

So what it is exactly, and how does it work?

1

There are 1 answers

1
Mike Kinghan On BEST ANSWER

Nothing novel I'm afraid. He just means class data that's defined in the class definition, the bog-standard way, rather than being hidden off in a pimpl. The talk is on YouTube and he explains this about 9:30 in.