comparison 3rdparty/vmime/cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-sizeof_member.cpp @ 0:a4671277546c tip

created the repository for the thymian project
author ferencd
date Tue, 17 Aug 2021 11:19:54 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:a4671277546c
1 struct foo {
2 char bar;
3 int baz;
4 };
5
6 int main(void)
7 {
8 bool ret = (
9 (sizeof(foo::bar) == 1) &&
10 (sizeof(foo::baz) >= sizeof(foo::bar)) &&
11 (sizeof(foo) >= sizeof(foo::bar) + sizeof(foo::baz))
12 );
13 return ret ? 0 : 1;
14 }