- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am getting the following error using intel c++ compiller only in debug model
D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xutility(809): error : assertion failed: pop_scope: unexpected curr_object_lifetime for function or block scope (shared/cfe/edgcpfe/scope_stk.c, line 9045)
1>
1> _NOEXCEPT_OP(_NOEXCEPT_OP(!_Pred(_Left, _Right))
1> ^
I am using Visual Studio 2015 Enterprise Update 2 with Intel C++ 16.0 update 3. And I use "using namespace std;" in the header file.
In addition, I use boost 1.16.0 and pybind11 in my project.
The error will not emerge in Release Mode.
When using Visual C++ compiler, there is no error found.
Is anybody could give me some suggestions.
Thanks,
Xia
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This looks like a compiler bug.
Can you attach the preprocessed file? (Use the -E switch on the compilation line that fails, redirect standard output to a text file, and attach the text file to your reply.) Also please show the command line which failed.
Thanks for the report. --Melanie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My building command line in VS2015 is
/GS /W0 /Zc:wchar_t /ZI /Od /Fd"x64\Debug\vc140.pdb" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Zc:forScope /RTC1 /MDd /Fa"x64\Debug\" /EHsc /nologo /Fo"x64\Debug\" /Qprof-dir "x64\Debug\" /Fp"x64\Debug\Energy.pch" -E
And the output of MSBuild is in file out.txt
Thanks.
- 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
I can reproduce this problem and I opened DPD200411626 in our internal bug tracking database. Thanks for the report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler seems to have a problem because the lambda is a c++14 generic lambda.
If you specify the parameter types to the lambda instead of using "auto" the compiler will work ok, i.e. change the code to match what's inside the #ifdef OK here:
void System::readxyzfile(const std::basic_string &filename) {
#ifdef OK
typedef shared_ptr<Atom> param_type;
#endif
for (auto &mol : mol_lst)
mol->atom_lst.sort(
#ifdef OK
[](const param_type& a, const param_type& b) { return a->seq < b->seq; }
);
#else
[](const auto &a, const auto &b) { return a->seq < b->seq; });
#endif
}
~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After change the c++14 generic lambda, my project can compile with intel c++ compiller.
Thank you very much for your help.
But I really can' t understand that intel compiler doesn't support C++14 on windows in the era of GCC6 already set C++14 as default option.

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