std::map::emplace_hint missing when cross-compiling for MIC

std::map::emplace_hint missing when cross-compiling for MIC

I think it is known issue [ : gcc 4.7.0 header use for iccc version 14.0.2 (gcc version 4.8.0 compatibility)] when cross-compiling for MIC. Following code compile fine with gcc 4.8.1 but it failed to build with icc 14.0.2

#include <map>
int main ()
  std::map<char,int> mymap;
  auto it = mymap.end();
  it = mymap.emplace_hint(it,'b',10);
  return 0;

>icpc -v
icpc version 14.0.2 (gcc version 4.8.0 compatibility)

>icpc -c -std=c++11 -mmic test.cpp -o test.o
test.cpp(6): error: class "std::map<char, int, std::less<char>, std::allocator<std::pair<const char, int>>>" has no member "emplace_hint"
    it = mymap.emplace_hint(it,'b',10);

Any work around or fix for this available?

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Shahzad,

It appears that emplace_hint requires gcc 4.8.  In MPSS 3.1, gcc 4.7 headers is shipped.  That could explain the failure.

If you type "icpc -std=c++11 -mmic test.cpp -o test.o -v", you will see search directories below:



Thanks, yes gcc 4.7 headers are being pickup. Any idea when MPSS might include 4.8 or above?

Sorry that I don't have that information.


Leave a Comment

Please sign in to add a comment. Not a member? Join today