Skip to content

Commit 9a9279f

Browse files
s-kanaevv-klochkov
andauthored
[SYCL] Resolve issue with 'max' and windows.h
Signed-off-by: Sergey Kanaev <[email protected]> Co-authored-by: Vyacheslav Klochkov <[email protected]>
1 parent c382be7 commit 9a9279f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/include/CL/sycl/handler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ typename std::enable_if<std::is_same<T, range<Dims>>::value ||
153153
checkValueRange(const T &V) {
154154
#if defined(__SYCL_ID_QUERIES_FIT_IN_INT__)
155155
static constexpr size_t Limit =
156-
static_cast<size_t>(std::numeric_limits<int>::max());
156+
static_cast<size_t>((std::numeric_limits<int>::max)());
157157
for (size_t Dim = 0; Dim < Dims; ++Dim)
158158
if (V[Dim] > Limit)
159159
throw runtime_error(NotIntMsg<T>::Msg, PI_INVALID_VALUE);

0 commit comments

Comments
 (0)