Skip to content

Fails to build with C++14 #3490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
steffenlarsen opened this issue Apr 5, 2021 · 4 comments
Closed

Fails to build with C++14 #3490

steffenlarsen opened this issue Apr 5, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@steffenlarsen
Copy link
Contributor

steffenlarsen commented Apr 5, 2021

Describe the bug
Building with DPC++ with C++14 causes errors. Looks like 4524a6b broke C++14 support and the only test that used it was removed shortly after: 815b43b

Among other similar errors, the commands results in the error:

.../include/sycl/CL/sycl/kernel_handler.hpp:51:13: error: 'auto' not allowed in template parameter until C++17
  template <auto &S, typename T = std::remove_reference_t<decltype(S)>,
            ^~~~
.../include/sycl/CL/sycl/kernel_handler.hpp:52:35: error: no template named 'is_fundamental_v' in namespace 'std'; did you mean 'is_fundamental'?
            std::enable_if_t<std::is_fundamental_v<T>> * = nullptr>
                             ~~~~~^
.../include/c++/7/type_traits:593:12: note: 'is_fundamental' declared here
    struct is_fundamental
           ^

Has C++14 support been dropped in its entirety?

To Reproduce
Build benchmark by running:

git clone https://gitlab.com/NERSC/nersc-proxies/su3_bench.git
cd su3_bench
make -f Makefile.dpcpp USE_SYCL=1 CC=path/to/clang++

Environment:

  • OS: Linux
  • Device: NVIDIA GPU
  • DPC++ version: 77d4fdf
@steffenlarsen steffenlarsen added the bug Something isn't working label Apr 5, 2021
@dm-vodopyanov
Copy link
Contributor

Hi @steffenlarsen, that's correct, since 4524a6b the compiler now supports C++17 and higher C++ standards. I've prepared a PR with an update to documentation: #3478

@steffenlarsen
Copy link
Contributor Author

According to the documentation (even after the current change in #3478):

  • DPC++ runtime and headers require C++14 at least.

However, the failure above stems from CL/sycl/kernel_handler.hpp using C++17 features, so it does not adhere to that requirement. Maybe that point needs to be change accordingly?

@pvchupin
Copy link
Contributor

pvchupin commented Apr 5, 2021

@steffenlarsen, any concerns if we move forward with #3447 ?

@steffenlarsen
Copy link
Contributor Author

Apart from my comment above, if this is the plan I will not stand in the way. Thank you for clarifying. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants