I am trying to build a CPP project which uses C++11 features. With GCC-4.8.3 and specifying -std=c++11 the code has no error.
Visual Studio 2013 as you know doesn't fully support C++11. Instead I installed Intel Parallel Studio XE 2015 which support C++11.
Now, in visual studio, I specified intel compiler to bypass VS compiler. See the figure below.
I also have enabled C++-11 support as below
However, I get some errors and the stack trace shows that the errors come from microsoft visual studio header files.
It seems that VS compiler has not been fully replaced by Intel compiler.
Full output is available at pastebin.
I know the full output is lengthy, so here is the code trace that produced one of the errors. Two errors are similar I think.
1)
Sequitur<char> s; char temp_char;
s.push_back(temp_char);
2)
template<typename Type>
void Sequitur<Type>::push_back(Type s){
//add new symbol:
Symbol * val = sequence_end->insertBefore(new Value(s));
if(++length > 1) {
auto one_from_end = val->prev();
linkMade(one_from_end);
}
}
3)
template<typename Type>
void Sequitur<Type>::linkMade(Symbol * first) {
Symbol * match_location = findAndAddDigram(first);
}
4)
template<typename Type>
Symbol * Sequitur<Type>::findAndAddDigram(Symbol * first) {
auto out_pair = digram_index.emplace(makeDigramPair(first),first);
}
At auto
line, the error is
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\utility(155): error : no instance of constructor "jw::SymbolWrapper::SymbolWrapper" matches the argument list
argument types are: (jw::SymbolWrapper)
: first(_STD forward<_Other1>(_Right.first)),
^
detected during:
instantiation of "std::pair<_Ty1, _Ty2>::pair(std::pair<_Other1, _Other2> &&) [with _Ty1=jw::SymbolWrapper, _Ty2=jw::SymbolWrapper, _Other1=jw::SymbolWrapper, _Other2=jw::SymbolWrapper, <unnamed>=void]" at line 142
Is there any idea to fix that? Why it doesn't follow Intel compiler header files and wrongly follow VS header files which I know it doesn't support C++11?
~~~~~~~~~~~~~~~~~~~~ UPDATE ~~~~~~~~~~~~~~~~~~~~
Testing Visual studio 2015 RC edition, the codes builds successfully without the need for Intel Compiler.