'for_each_n' is not a member of 'std' in C++17

后端 未结 1 1686
独厮守ぢ
独厮守ぢ 2021-01-13 19:47

I have small piece of code for std::for_each_n loop. I tried running it on inbuilt Coliru compiler GCC C++17 using following command :

g++ -std         


        
相关标签:
1条回答
  • 2021-01-13 20:25

    There is nothing wrong with your code. The issue is that libstdc++ does not support std::for_each_n as of yet. If we look at header that defines std::for_each we see it does not exist.

    However, if you have access to libc++, their header from the official mirror does implement std::for_each_n

    0 讨论(0)
提交回复
热议问题