Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel ICX Compiler , Intel® DPC++ Compatibility Tool, and GDB*
580 Discussions

Problems to compile std::views with oneapi compiler (version 2023.0.0) on linux

MXG
New Contributor I
785 Views

Hi,

 

We problems to compile std::views with oneapi compiler (version 2023.0.0) on Linux:

/opt/intel/oneapi/compiler/2023.0.0/linux/bin/icpx -std=c++20 test_view.cxx -o test_view

 

- it seems to work fine using the same version on Windows.

Attached is the code snippet and the build error log from Redhat 8

 

Regards,

Morten Gaupaas

 

Code snippet:

#include <iostream>
#include <ranges>

using namespace std;

int main()
{ auto even = [](int i) { return 0 == i % 2; };
  auto square = [](int i) { return i * i; };
  for (int i : std::views::iota(0, 6)
             | views::filter(even)
             | std::views::transform(square))
             std::cout << i << ' ';
}
0 Kudos
1 Solution
RabiyaSK_Intel
Moderator
730 Views

Hi,

 

Thanks for posting in Intel Communities.

 

Could you please try with latest oneAPI toolkit(2023.1 version)?

 

We didn't face any issues while executing your code on 2023.1 oneAPI toolkit. Please refer to the below screenshot.

RabiyaSK_Intel_0-1681987915589.png

If you still face any issues, you can reach out to us.

 

Thanks & Regards,

Shaik Rabiya

 

View solution in original post

0 Kudos
3 Replies
RabiyaSK_Intel
Moderator
731 Views

Hi,

 

Thanks for posting in Intel Communities.

 

Could you please try with latest oneAPI toolkit(2023.1 version)?

 

We didn't face any issues while executing your code on 2023.1 oneAPI toolkit. Please refer to the below screenshot.

RabiyaSK_Intel_0-1681987915589.png

If you still face any issues, you can reach out to us.

 

Thanks & Regards,

Shaik Rabiya

 

0 Kudos
MXG
New Contributor I
673 Views

Installed version 2023.1.0 on Linux and it worked fine - thanks!

 

Regards,

Morten 

0 Kudos
RabiyaSK_Intel
Moderator
646 Views

Hi,


Thanks for accepting our solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel. 


Thanks & Regards,

Shaik Rabiya


0 Kudos
Reply