Value of type 'std::memory_order' is not implicitly convertible to 'int'

I’m getting the error in the title while compiling the code from here:

> compute++ -std=c++2a -sycl-driver -sycl-target spirv64 -I/home/jan/software/sycl/computecpp/include template-ptr.cpp -ftemplate-backtrace-limit=0 -o template-ptr -lComputeCpp
In file included from template-ptr.cpp:3:
In file included from /home/jan/software/sycl/computecpp/include/CL/sycl.hpp:1:
In file included from /home/jan/software/sycl/computecpp/include/CL/../SYCL/sycl.hpp:21:
In file included from /home/jan/software/sycl/computecpp/include/SYCL/sycl_interface.h:35:
In file included from /home/jan/software/sycl/computecpp/include/SYCL/accessor.h:52:
/home/jan/software/sycl/computecpp/include/SYCL/atomic.h:33:43: error: value of type 'std::memory_order' is not implicitly convertible to 'int'
enum class memory_order : int { relaxed = std::memory_order_relaxed };
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~

This occurs with ComputeCpp CE 1.1.5, Ubuntu 19.10 and the system-default GCC and libstdc++ (9.2.1). ComputeCpp uses the following include paths:

Codeplay ComputeCpp - CE 1.1.5 Device Compiler - clang version 6.0.0  (based on LLVM 6.0.0svn)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jan/software/sycl/computecpp/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Selected multilib: .;@m64
 "/home/jan/software/sycl/computecpp/bin/compute++" -cc1 -triple x86_64-unknown-linux-gnu -aux-triple spir64-unknown-unknown -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name template-ptr.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -v -resource-dir /home/jan/software/sycl/computecpp/lib/clang/6.0.0 -I /home/jan/software/sycl/computecpp/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/backward -internal-isystem /usr/local/include -internal-isystem /home/jan/software/sycl/computecpp/lib/clang/6.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -std=c++2a -fdeprecated-macro -fdebug-compilation-dir /home/jan/workspace/sycl-issues -ferror-limit 19 -ftemplate-backtrace-limit 0 -fmessage-length 204 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -sycl -Rsycl-serial-memop -Rsycl-kernel-naming -sycl-ih /tmp/template-ptr-c8cc59.sycl -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/template-ptr-d66c52.o -x c++ template-ptr.cpp
clang -cc1 version 6.0.0 based upon LLVM 6.0.0svn default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
ignoring duplicate directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9"
#include "..." search starts here:
#include <...> search starts here:
 /home/jan/software/sycl/computecpp/include
 /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9
 /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9
 /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/backward
 /usr/local/include
 /home/jan/software/sycl/computecpp/lib/clang/6.0.0/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.

Thanks Jan, I’ve raised an internal issue to track this.

Hi Jan,
Our C++ support goes up to C++14 and you are trying to compile with C++20 so I think that is what is causing this error.
See https://en.cppreference.com/w/cpp/atomic/memory_order

Edited this post as I didn’t read the other thread properly.

Ah, I see. Thanks for the hint. C++17 also works fine, so I will stick to that now.