4 ms·
This weird ambiguous syntax exists to allow among other things templates that take either primitive or class types. It makes primitive types usable as if they a
by api 6y ago
This weird ambiguous syntax exists to allow among other things templates that take either primitive or class types. It makes primitive types usable as if they are classes with copy constructors.
That being said, it can certainly be ugly. A lot of the ugliness comes from trying to maintain itself as a mostly superset of C. Technically it no longer is strictly that, but most C code will compile fine in a C++ source file.