- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The headers "chrono", "string" and "complex" shipped with Visual Studio 2017 (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include) are currently broken with "Intel C++ Compiler 18.0".
Microsoft has switched these headers to make use of "inline namespace" (C++14, "std::literals" has become an inline namespace), and icpc fails parsing these when operating in MSVC compatbility mode (/Qvc14).
It does not emit the warnings it would have when operating in a pre-C++11 standard ("inline can only be used on ..."), but fails straight out with a parser error ("identifier expected" on the "namespace" keyword).
The headers for "std::experimental" shipped with VS2017 make even heavier use of the "inline namespace" feature and are essentially all broken.
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"inline namespace" is enabled in 18.0 when MSVC++ 2015 compatibility mode is in effect. See below.
What command line options are you using? Does the example below compile for you? If not does it compile if you explicitly specify /Qvc14?
Judy
bash-3.2$ cat t.cpp
namespace N {
inline namespace {
}
}
bash-3.2$ icl -c t.cpp
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Versi
on 18.0 Beta Build x
Built Sep 22 2017 17:30:02 by jward4 on JWARD4-DESK1 in D:/workspaces/18_0cfe/de
v
Copyright (C) 1985-2017 Intel Corporation. All rights reserved.
t.cpp
bash-3.2$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, the minimal example builds.
It was actually a fault on my side. Found an ancient header which had a "#define inline __inline" in it. That one broke the std headers.
Both Clang/C2 and MSVC did actually accept "__inline namespace [identifier]" and handle it as expected, so I didn't notice.
ICPC didn't.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have captured the Chrono header issue in our internal tracker CMPLRS-47574
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anoop, this customer complaint has nothing to do with cmplrs-47574 (which is fixed in 18.0 which is what the customer said they were using).
This was a complaint about the "inline namespace" feature not working correctly.
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Confirm the inline namespace issue.
I'm trying to use it together with /Qvc14.1 and msvc 2017 headers but still get the error from icl 18.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Andreas R. wrote:
"inline namespace" works. "__inline namespace" doesn't.
Look if you have any header which has a "#define inline __inline" in it. That might be the case for headers which were written for ancient MSVC versions.
Thanks! That is the case :)

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page