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 Обсуждение

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

MXG
Новый участник I
2 102Просмотр.

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 баллов
1 Решение
RabiyaSK_Intel
Сотрудник
2 047Просмотр.

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

 

Просмотреть решение в исходном сообщении

3 Ответы
RabiyaSK_Intel
Сотрудник
2 048Просмотр.

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
Новый участник I
1 990Просмотр.

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

 

Regards,

Morten 

RabiyaSK_Intel
Сотрудник
1 963Просмотр.

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


Ответить