Changes between Version 1 and Version 2 of doc/useless-rants


Ignore:
Timestamp:
Jan 24, 2013, 6:30:31 PM (6 years ago)
Author:
sam
Comment:

visual studio variadic macros

Legend:

Unmodified
Added
Removed
Modified
  • doc/useless-rants

    v1 v2  
     1[[TOC]]
    12Catharsis for annoyances in life, ranging from infuriating idiocies to minor annoyances that could even have justifiable causes.
    23
     
    1011
    1112Seriously. Why the fuck do you care about the name of my file.
     13
     14=== Visual Studio 2010 variadic macros ===
     15
     16{{{
     17#!cpp
     18#define FOO(a, b, c, d, e, f, g, h, ...) h
     19#define COUNT(...) FOO(__VA_ARGS__, 7, 6, 5, 4, 3, 2, 1, 0)
     20
     21int x = COUNT(0, 0, 0);
     22printf("This macro has %d arguments\n"), x);
     23}}}
     24
     25Fuck you, Visual Studio, for printing 1 where every other compiler on the planet can count to 3.