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

16.0.0 glitch with GCC 5.1.1 C++ headers in C++11 mode

$
0
0

The following code compiles fine with just 'icpc test.cc':

#include <vector>

int main (int argc, char *argv[]) {
  std::vector<int> x (100, 1);
}

But with  icpc -std=c++11, it produces:

/usr/include/c++/5.1.1/bits/stl_iterator_base_types.h(154): error: name followed by "::" must be a class or namespace name
        typedef typename _Iterator::iterator_category iterator_category;
                         ^
          detected during:
            instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" at line 163
            instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" at line 4 of "t-icpc.cc"

/usr/include/c++/5.1.1/bits/stl_iterator_base_types.h(155): error: name followed by "::" must be a class or namespace name
        typedef typename _Iterator::value_type        value_type;
                         ^
          detected during:
            instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" at line 163
            instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" at line 4 of "t-icpc.cc"

/usr/include/c++/5.1.1/bits/stl_iterator_base_types.h(156): error: name followed by "::" must be a class or namespace name
        typedef typename _Iterator::difference_type   difference_type;
                         ^
          detected during:
            instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" at line 163
            instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" at line 4 of "t-icpc.cc"

/usr/include/c++/5.1.1/bits/stl_iterator_base_types.h(157): error: name followed by "::" must be a class or namespace name
        typedef typename _Iterator::pointer           pointer;
                         ^
          detected during:
            instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" at line 163
            instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" at line 4 of "t-icpc.cc"

/usr/include/c++/5.1.1/bits/stl_iterator_base_types.h(158): error: name followed by "::" must be a class or namespace name
        typedef typename _Iterator::reference         reference;
                         ^
          detected during:
            instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" at line 163
            instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" at line 4 of "t-icpc.cc"

Observed on Fedora 22 system with stock GCC 5.1.1.


Viewing all articles
Browse latest Browse all 1665

Trending Articles



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