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

Fix user-defined literal detection for Intel C++ compiler (#311) #312

Merged
merged 2 commits into from May 3, 2016

Conversation

dean0x7d
Copy link
Contributor

@dean0x7d dean0x7d commented May 3, 2016

Fixes #311.

The FMT_USE_USER_DEFINED_LITERALS check is beginning to resemble a dumpster fire, but as per Intel's C++11 feature notes both the system compiler (gcc/msc) and icc itself must support the given feature:

On Windows: when using Intel C++ compiler with Visual Studio 2010* or 2012*, the C++11 features supported by Visual C++ 2010/2012 are enabled by default. Use "/Qstd=c++11" to turn on the support for all other cases.
On Linux or Mac OS X: the C++11 features supported by gcc on the path are enabled by default. Use "-std=c++11" to turn on the support for all other cases.

To make sure the UDL detection still works on any compiler I added a new compile test which checks that the feature detection in the header matches the one in CMake. CMAKE_CXX_COMPILER and CPP11_FLAG are passed to compile-test to ensure the same configuration.

Tested and working with Intel C++ 14.0-16.0 on Linux and 16.0 on Windows.

@vitaut vitaut merged commit 4042198 into fmtlib:master May 3, 2016
@vitaut
Copy link
Contributor

vitaut commented May 3, 2016

Merged, thanks a lot for fixing this!

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.

None yet

2 participants