Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
789 Discussões

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

MXG
Novo colaborador I
2.098 Visualizações

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 Solução
RabiyaSK_Intel
Funcionário
2.043 Visualizações

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

 

Ver solução na publicação original

3 Respostas
RabiyaSK_Intel
Funcionário
2.044 Visualizações

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

 

MXG
Novo colaborador I
1.986 Visualizações

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

 

Regards,

Morten 

RabiyaSK_Intel
Funcionário
1.959 Visualizações

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


Responder