r/VisualStudio • u/Downtown_Fall_5203 • 1d ago
Visual Studio 2022 'small' issue
I just hit an issue with using a variable named 'small':
test.: error: cannot combine with previous 'type-name' declaration specifier
| QFont small = ;
| ^
f:\gv\WinKit\Include\10.0.28000.0\shared\rpcndr.: note: expanded from macro 'small'
201 | #define small char
| ^
test.: error: expected unqualified-id
1596 | QFont small = ;
| ^
And headers like rpcndr.h could be included from several places.
Most important <windows.h>.
AFAICS, macros like small, far, FAR, near etc.
has not been needed since Win-95. Or was it Win 3.11?
But Microsoft has not seen the need to remove these.
Anybody knows why these are still there? Just laziness?




