Hacker News new | ask | show | jobs
by masklinn 1704 days ago
Not necessarily, you could imagine a system where the header file specifies its edition.
2 comments

A header file can check #if __STDC_VERSION__ or __cplusplus versions to make some code conditionally available for, say, C11 or C++11.

  #if __STDC_VERSION__ >= 201112L
    // C11 feature
  #endif

  #if __cplusplus >= 201103L
    // C++11 feature
  #endif
But don't header files generally get concatenated together due to the way "dumb" textual includes work?