From 5d0123c3f04ffa9f2bd6f35b4406f3812d03efa3 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Tue, 8 Oct 2024 10:51:19 -0700 Subject: [PATCH] disable use of stdext::checked_array_iterator for VS2019 and newer (#309) --- include/CL/opencl.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/CL/opencl.hpp b/include/CL/opencl.hpp index e3202cab..970e67b1 100644 --- a/include/CL/opencl.hpp +++ b/include/CL/opencl.hpp @@ -10299,15 +10299,15 @@ inline cl_int copy( const CommandQueue &queue, IteratorType startIterator, Itera if( error != CL_SUCCESS ) { return error; } -#if defined(_MSC_VER) +#if defined(_MSC_VER) && _MSC_VER < 1920 std::copy( - startIterator, - endIterator, + startIterator, + endIterator, stdext::checked_array_iterator( pointer, length)); #else std::copy(startIterator, endIterator, pointer); -#endif +#endif // defined(_MSC_VER) && _MSC_VER < 1920 Event endEvent; error = queue.enqueueUnmapMemObject(buffer, pointer, 0, &endEvent); // if exceptions enabled, enqueueUnmapMemObject will throw