c++ – What is a lightweight class?

Question:

I've been looking for a concise explanation for this question for a while. What I found were confusing and not very didactic texts.

Answer:

As far as I know there is no clear and universally accepted definition of what this term means.

Some people might say that it is a POD ( Plain Old Data ) where, roughly, the data is arranged in a way compatible with the format adopted by C.

Others might say that they are classes with a very short size and that they can be copied more easily rather than being passed in as a reference. OR it could still be one that doesn't have a virtualization table, although less likely.

In certain contexts there may be a specific explanation.

Scroll to Top