Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

Unable to compile c++ code in Fedora linux

$
0
0

Hi,

I am unable to compile the following  c++ code. 

#include <iostream>
int main ()
{
        std::cout<<"Hello world !"<<std::endl ;
        return 0 ;
}

gcc version 8.0.1 20180131

icpc version 18.0.1 

Compilation Error :

icpc   hello.cpp
In file included from /usr/include/c++/8/bits/move.h(55),
                 from /usr/include/c++/8/bits/nested_exception.h(40),
                 from /usr/include/c++/8/exception(144),
                 from /usr/include/c++/8/ios(39),
                 from /usr/include/c++/8/ostream(38),
                 from /usr/include/c++/8/iostream(39),
                 from hello.cpp(1):
/usr/include/c++/8/type_traits(1061): error: type name is not allowed
        : public __bool_constant<__is_assignable(_Tp, _Up)>
                                                 ^

In file included from /usr/include/c++/8/bits/move.h(55),
                 from /usr/include/c++/8/bits/nested_exception.h(40),
                 from /usr/include/c++/8/exception(144),
                 from /usr/include/c++/8/ios(39),
                 from /usr/include/c++/8/ostream(38),
                 from /usr/include/c++/8/iostream(39),
                 from hello.cpp(1):
/usr/include/c++/8/type_traits(1061): error: type name is not allowed
        : public __bool_constant<__is_assignable(_Tp, _Up)>
                                                      ^

In file included from /usr/include/c++/8/bits/move.h(55),
                 from /usr/include/c++/8/bits/nested_exception.h(40),
                 from /usr/include/c++/8/exception(144),
                 from /usr/include/c++/8/ios(39),
                 from /usr/include/c++/8/ostream(38),
                 from /usr/include/c++/8/iostream(39),
                 from hello.cpp(1):
/usr/include/c++/8/type_traits(1061): error: identifier "__is_assignable" is undefined
        : public __bool_constant<__is_assignable(_Tp, _Up)>
                                 ^

compilation aborted for hello.cpp (code 2)

 

 


Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>