source: tests/sizeof.cfa@ 025f9c5

Last change on this file since 025f9c5 was 97f8f0f, checked in by Andrew Beach <ajbeach@…>, 13 months ago

Implemented special case of sizeof/alignof, where reference types are ignored for these operations.

  • Property mode set to 100644
File size: 330 bytes
Line 
1// Testing non-polymorphic sizeof (and alignof) expressions:
2
3#include <fstream.hfa>
4
5int main(int argc, char * argv[]) {
6 char val = 'c';
7 char & ref = val;
8 // It could check against "char *", but it should always be different.
9 sout | "char : " | sizeof(val) | alignof(val);
10 sout | "char &: " | sizeof(ref) | alignof(ref);
11}
Note: See TracBrowser for help on using the repository browser.