What is the purpose of standard layouts for black box types?

The C ++ standard indicates that a mutex, atoms, or conditinal_variable are of the standard layout type.

What is the advantage of this specification? How can a user use this property?

And in general, what could I get if I knew the type of a standard layout without knowing the details of its implementation?

+6
source share
2 answers

You can make your code conversation with other programs written in different programming languages ​​than yours.

In the C ++ Concept links : StandardLayoutType :

, .

+1

:

, .

, C ++, C , C, , ++. .

+2

All Articles