diff --git a/CMakeLists.txt b/CMakeLists.txt index 038ab61..666451e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.26) set(CMAKE_C_STANDARD 11) -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 23) # Initialise pico_sdk from installed location # (note this can come from environment, CMake cache etc) diff --git a/src/raspikeyer.cpp b/src/raspikeyer.cpp index 1f04e72..20757b9 100644 --- a/src/raspikeyer.cpp +++ b/src/raspikeyer.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include "bsp/board.h" #include "hardware/adc.h" @@ -141,7 +141,7 @@ int main() auto timestamp = get_absolute_time(); auto ignoreButtonKeyerModeUntil = timestamp; - uint count = static_cast::type>(settings.mode); // TODO: Simplify with C++23 + auto count = std::to_underlying(settings.mode); while (true) { timestamp = get_absolute_time();