Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use define to determine if c++11 or not #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ericcurtin
Copy link

So the developer doesn't have to worry about what version of c++ a file
is being compiled as.

@ericcurtin ericcurtin force-pushed the dx-using-lib branch 2 times, most recently from 0e8e6ea to f897fe0 Compare April 3, 2018 14:30
@ericcurtin
Copy link
Author

ericcurtin commented Apr 3, 2018

Another option is to split into three files prettyprint.hpp, prettyprint98.hpp and prettyprint11.hpp

With prettyprint.hpp being like so:

#if __cplusplus >= 201103L // we are using a compiler with c++11
#include "prettyprint11.hpp"
#else // we are using pre-c++11 compiler
#include "prettyprint98.hpp"
#endif

So the developer doesn't have to worry about what version of c++ a file
is being compiled as.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant