diff --git a/CMakeLists.txt b/CMakeLists.txt index 1060f70bb0..6e35d1ef4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2024 Intel Corporation +# Copyright (C) 2018-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -300,8 +300,8 @@ if(NOT NEO_BINARY_DIR) set(NEO_BINARY_DIR ${CMAKE_BINARY_DIR}) endif() -# we use c++17 -set(CMAKE_CXX_STANDARD 17) +# we use c++20 +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) # we force using response files diff --git a/opencl/test/unit_test/program/printf_handler_tests.cpp b/opencl/test/unit_test/program/printf_handler_tests.cpp index e6337ab9de..8ac1a1b27c 100644 --- a/opencl/test/unit_test/program/printf_handler_tests.cpp +++ b/opencl/test/unit_test/program/printf_handler_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -246,7 +246,17 @@ HWTEST_F(PrintfHandlerTests, givenPrintfHandlerWhenEnqueueIsBlockedThenDontUsePr class MyMockCommandQueueHw : public CommandQueueHw { public: using CommandQueueHw::CommandQueueHw; - using CommandQueueHw::enqueueKernel; + + cl_int enqueueKernel(Kernel *kernel, + cl_uint workDim, + const size_t *globalWorkOffset, + const size_t *globalWorkSize, + const size_t *localWorkSize, + cl_uint numEventsInWaitList, + const cl_event *eventWaitList, + cl_event *event) override { + return this->CommandQueueHw::enqueueKernel(kernel, workDim, globalWorkOffset, globalWorkSize, localWorkSize, numEventsInWaitList, eventWaitList, event); + } WaitStatus waitForAllEngines(bool blockedQueue, PrintfHandler *printfHandler, bool cleanTemporaryAllocationsList) override { waitCalled = true; diff --git a/shared/source/program/print_formatter.cpp b/shared/source/program/print_formatter.cpp index 9775bc57ae..a1d65eb42c 100644 --- a/shared/source/program/print_formatter.cpp +++ b/shared/source/program/print_formatter.cpp @@ -128,7 +128,9 @@ void PrintFormatter::adjustFormatString(std::string &formatString) { UNRECOVERABLE_IF(formatString.size() - 1 == longPosition); if (formatString.at(longPosition + 1) != 'l') { - formatString.insert(longPosition, "l"); + formatString.append(1, '\0'); + std::move_backward(formatString.begin() + longPosition, formatString.end() - 1, formatString.end()); + formatString[longPosition] = 'l'; } }