Skip to content

Commit 058b986

Browse files
[SYCL] Fix compilation fail on Windows
Apparently, std::max(smth) cannot be used...
1 parent 1927d21 commit 058b986

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sycl/include/CL/sycl/usm/usm_allocator.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ class usm_allocator {
117117

118118
private:
119119
constexpr size_t getAlignment() const {
120-
return std::max(alignof(T), Alignment);
120+
using std::max; // Cause of MS Windows' macro...
121+
return max(alignof(T), Alignment);
121122
}
122123

123124
template <class U, usm::alloc AllocKindU, size_t AlignmentU>

0 commit comments

Comments
 (0)