Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
26 Views

parallel studio 2015 unable to compile C++11 code

I am trying to compile a c++ code which uses C++-11 features. The code can be build with gcc-4.8.3 using the following command

g++ -std=c++11 main.cpp sequitur/*.cpp

However, I am not able to compile it on Parallel Studio XE 2015. Although Visual studio 2013 doesn't fully implement C++-11 features, the ICL reports some error in the visual studio header files. I know that visual studio is unable to build that. I have installed parallel XE 2015 to use ICL features.

 

Here is the complete output

D:\sequitur> icl /Qstd=c++11 main.cpp sequitur\*.cpp

 

Intel(R) C++ Compiler XE for applications running on IA-32, Version 15.0.1.148 Build 20141023
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

main.cpp
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
            instantiation of "std::pair<_Ty1, _Ty2>::pair(_Other1 &&, _Other2 &&) [with _Ty1=const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, _Ty2=jw::Symbol *, _Other1=std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, _Other2=jw::Symbol *&, <unnamed>=void]" at line 600 of "C:\Program Files (x86)\Microsoft VisualStudio 12.0\VC\INCLUDE\xmemory0"
            instantiation of "void std::allocator<_Ty>::construct(_Objty *, _Types &&...) [with _Ty=std::_List_node<std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, void *>, _Objty=std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, _Types=<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *&>]" at line 723 of "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xmemory0"
            instantiation of "void std::allocator_traits<std::allocator<_Ty>>::construct(std::allocator_traits<std::allocator<_Ty>>::_Alloc &, _Objty *, _Types&&...) [with _Ty=std::_List_node<std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, void *>, _Objty=std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, _Types=<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *&>]" at line 872 of "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xmemory0"
            instantiation of "void std::_Wrap_alloc<_Alloc>::construct(_Ty *, _Types &&...) [with _Alloc=std::allocator<std::_List_node<std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, void *>>, _Ty=std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, _Types=<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *&>]" at line 835 of "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\list"
            [ 2 instantiation contexts not shown ]
            instantiation of "void std::list<_Ty, _Alloc>::emplace_front(_Valty&&...) [with _Ty=std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, _Alloc=std::allocator<std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>>, _Valty=<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *&>]" at line 394 of "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xhash"
            instantiation of "std::_Hash<_Traits>::_Pairib std::_Hash<_Traits>::
emplace(_Valty &&...) [with _Traits=std::_Umap_traits<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *, std::_Uhash_compare<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, std::hash<std::pair<jw::SymbolWrapper, jw::SymbolWrapp
er>>, std::equal_to<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>>>, std::allocator<std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>>, 0>,                     _Valty=<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *&>]" at line 284 of "D:\mahmood\Documents\Visual Studio 2013\Projects\sequitur\sequitur\sequitur.hpp"
            instantiation of "jw::Symbol *jw::Sequitur<Type>::findAndAddDigram(jw::Symbol *) [with Type=char]" at line 253 of "D:\mahmood\Documents\Visual Studio 2013\Projects\sequitur\sequitur\sequitur.hpp"
            instantiation of "void jw::Sequitur<Type>::linkMade(jw::Symbol *) [w
ith Type=char]" at line 226 of "D:\mahmood\Documents\Visual Studio 2013\Projects\sequitur\sequitur\sequitur.hpp"
            instantiation of "void jw::Sequitur<Type>::push_back(Type) [with Type=char]" at line 42 of "main.cpp"

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\utility(156): error: no instance of constructor "jw::SymbolWrapper::SymbolWrapper" matches the argument list
            argument types are: (jw::SymbolWrapper)
                        second(_STD forward<_Other2>(_Right.second))
                              ^
          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
            instantiation of "std::pair<_Ty1, _Ty2>::pair(_Other1 &&, _Other2 &&) [with _Ty1=const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, _Ty2=jw::Symbol *, _Other1=std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, _Other2=jw::Symbol *&, <unnamed>=void]" at line 600 of "C:\Program Files (x86)\Microsoft VisualStudio 12.0\VC\INCLUDE\xmemory0"
            instantiation of "void std::allocator<_Ty>::construct(_Objty *, _Types &&...) [with _Ty=std::_List_node<std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, void *>, _Objty=std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, _Types=<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *&>]" at line 723 of "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xmemory0"
            instantiation of "void std::allocator_traits<std::allocator<_Ty>>::c
onstruct(std::allocator_traits<std::allocator<_Ty>>::_Alloc &, _Objty *, _Types&&...) [with _Ty=std::_List_node<std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, void *>, _Objty=std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, _Types=<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *&>]" at line 872 of "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xmemory0"
            instantiation of "void std::_Wrap_alloc<_Alloc>::construct(_Ty *, _Types &&...) [with _Alloc=std::allocator<std::_List_node<std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, void *>>, _Ty=std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, _Types=<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *&>]" at line 835 of "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\list"
            [ 2 instantiation contexts not shown ]
            instantiation of "void std::list<_Ty, _Alloc>::emplace_front(_Valty&&...) [with _Ty=std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>, _Alloc=std::allocator<std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>>, _Valty=<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *&>]" at line 394 of "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xhash"
            instantiation of "std::_Hash<_Traits>::_Pairib std::_Hash<_Traits>::emplace(_Valty &&...) [with _Traits=std::_Umap_traits<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *, std::_Uhash_compare<std::pair<jw::SymbolWra
pper, jw::SymbolWrapper>, std::hash<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>>, std::equal_to<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>>>, std::allocator<std::pair<const std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *>>, 0>,                      _Valty=<std::pair<jw::SymbolWrapper, jw::SymbolWrapper>, jw::Symbol *&>]" at line 284 of "D:\mahmood\Documents\Visual Studio 2013\Projects
\sequitur\sequitur\sequitur.hpp"
            instantiation of "jw::Symbol *jw::Sequitur<Type>::findAndAddDigram(jw::Symbol *) [with Type=char]" at line 253 of "D:\mahmood\Documents\Visual Studio 2013\Projects\sequitur\sequitur\sequitur.hpp"
            instantiation of "void jw::Sequitur<Type>::linkMade(jw::Symbol *) [with Type=char]" at line 226 of "D:\mahmood\Documents\Visual Studio 2013\Projects\sequitur\sequitur\sequitur.hpp"
            instantiation of "void jw::Sequitur<Type>::push_back(Type) [with Type=char]" at line 42 of "main.cpp"

symbols.cpp
symbolwrapper.cpp

D:\sequitur>

 

 

 

As you can see it goes over visual studio headers and reports some errors!

0 Kudos
1 Reply
Highlighted
Employee
26 Views

 

 

In order to do anything with this we will need a reproducer (all files including header files necessary to show the compilation error or you can just create a preprocessed file). The /Qstd=c++11 switch enables c++11 features in the compiler but we don't provide our own system headers so it could be a difference in the Microsoft versus the GNU header files. Also /Qstd=c++11 enables additional c++11 features not available in the reference compiler but it doesn't disable Microsoft-compatible behavior of those features.

Those are just some possibilities as to why it doesn't compile, but it also could be just a compiler bug.

thanks,

Judy

0 Kudos