<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">According to <a href="https://en.cppreference.com/w/cpp/named_req/StandardLayoutType" class="">https://en.cppreference.com/w/cpp/named_req/StandardLayoutType</a>, this should report true:</div><div class=""><br class=""></div><font face="CourierPrime" class=""><span style="font-style: normal;" class="">#include <iostream><br class="">#include <type_traits><br class=""><br class=""></span></font><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class="">struct Base {</span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class=""> int b_a;</span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class="">};</span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class=""><br class=""></span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class="">struct Foo : Base {</span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class=""> int a;</span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class="">};</span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class=""><br class=""></span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class="">int main()</span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class="">{</span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class=""> std::cout << std::boolalpha;</span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class=""> std::cout << "Base " << std::is_standard_layout<Base>::value << "\n";</span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class=""> std::cout << "Foo " << std::is_standard_layout<Foo>::value << "\n";</span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class="">}</span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class=""><br class=""></span></font></div><div class=""><font face="CourierPrime" class=""><span style="font-style: normal;" class="">1103_ clang++ -std=c++14 /tmp/XXX.cpp -o /tmp/XXX<br class="">1104_ /tmp/XXX<br class="">Base true<br class="">Foo false<br class="">1105_ clang++ --version<br class="">Apple clang version 12.0.5 (clang-1205.0.22.11)<br class="">Target: x86_64-apple-darwin20.5.0<br class="">Thread model: posix<br class="">InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin<br class=""></span></font><br class=""></div><div class="">Or is this just an Apple/Clang thing and I should complain to them?</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>David</div><div class=""><br class=""></div><div class="">David Barto | Principal Engineer<br class="">barto@cambridgesemantics.com<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""></div><br class=""></body></html>