3

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.

enter image description here

I also have enabled C++-11 support as below

enter image description here

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.

mahmood
  • 23,197
  • 49
  • 147
  • 242
  • I added the link to the CPP project – mahmood May 09 '15 at 07:48
  • ICC doesn't have its own standard library. It uses MSVC's on Windows. – T.C. May 09 '15 at 08:20
  • So what is the difference? Why they say in the manual that ICC fully supports c++11? – mahmood May 09 '15 at 08:36
  • The compiler supports all the C++11 *language* features. The support of *library* features depends on the standard library you are using. – T.C. May 09 '15 at 09:08
  • I searched for what you stated. It is not clear though... If there exists such dependecy, then what is the point of using ICC? At the end of the day, it depends on MSVC! Still looking for a way to fix that – mahmood May 09 '15 at 14:33
  • 1
    Have you tried with the latest Visual Studio 2015 release? – Léo Natan May 10 '15 at 09:31
  • The latest VS 2015 might help, but there is not yet a release. It is still a release candidate. – usr1234567 May 10 '15 at 10:00

0 Answers0