Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

How to get out of #include "stuff.h" hell?

Joined
Dec 1, 2013
Messages
452
To each his own. Although fun is probably the last word I'd ever associate with C++. I'd say it's a necessary evil in some situations.
 

Leshy

Educated
Joined
Mar 9, 2014
Messages
33
Location
Cydonia, Mars
#pragma once is non-standard and has subtly different behavior than include guards. That's exactly the kind of stuff that's bound to blow up in your face when you expect it the least.

This particular feature has been standardized as of C++x11 (or C++x12... One of the more recent ones...). VS C++ and Clang (and I'm quite sure GCC) that support that, behave the same. But I cannot vouch for other compilers.
 
Joined
Dec 1, 2013
Messages
452
FFFFUUUUUU-n then?

Yes, that's more like it. :D

This particular feature has been standardized as of C++x11 (or C++x12... One of the more recent ones...). VS C++ and Clang (and I'm quite sure GCC) that support that, behave the same. But I cannot vouch for other compilers.

It's widely supported, but not part of any standard. C++ is getting a module system now (and has always eschewed the preprocessor), so I doubt anything will change in this area.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom