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

icpc-16.0 Update4 does not know std::rbegin() and std::rend()

$
0
0

Hi, the code below can be compiled fine with g++-5.4.0 under Ubuntu-16.04, but not with icpc-16.0 Update4 even if -std=c++14 specified.

% icpc -V

Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.4.258 Build 20160811

Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

 

% icpc -std=c++14 -O3   -c -o main.o main.cc
main.cc(9): error: namespace "std" has no member "rbegin"
      for (auto iter = std::rbegin(a); iter != std::rend(a); ++iter)
                            ^

main.cc(9): error: namespace "std" has no member "rend"
      for (auto iter = std::rbegin(a); iter != std::rend(a); ++iter)
                                                    ^

#include <iterator>
#include <iostream>

int
main()
{
    int	a[] = {0, 1, 2, 3, 4, 5, 6, 7};

    for (auto iter = std::rbegin(a); iter != std::rend(a); ++iter)
	std::cout << ''<< *iter;
    std::cout << std::endl;

    return 0;
}

 


Viewing all articles
Browse latest Browse all 1175

Trending Articles



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