From 9111167361b1d07f9daede0d9eb4731d540fa80b Mon Sep 17 00:00:00 2001 From: Richard Beattie Date: Fri, 14 Jul 2023 16:07:37 -0400 Subject: [PATCH] Replace boost::optional with std::optional --- CMakeLists.txt | 6 +++--- blepp/lescan.h | 7 ++++--- examples/lescan.cc | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b371a29..b74a4e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ project(ble++) set(PROJECT_VERSION "1.2") set(PROJECT_DESCRIPTION "Bluetooth LE interface for C++") -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) set(TARGET1_NAME ${PROJECT_NAME} CACHE INTERNAL "") set(default_build_type "Release") @@ -56,7 +56,7 @@ add_library(${PROJECT_NAME} SHARED ${SRC}) target_link_libraries(${PROJECT_NAME} ${BLUEZ_LIBRARIES}) set_target_properties(${PROJECT_NAME} PROPERTIES - CXX_STANDARD 11 + CXX_STANDARD 17 CMAKE_CXX_STANDARD_REQUIRED YES SOVERSION 5) @@ -77,7 +77,7 @@ if(WITH_EXAMPLES) set_target_properties(${example_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY examples) set_target_properties(${example_name} PROPERTIES - CXX_STANDARD 11 + CXX_STANDARD 17 CMAKE_CXX_STANDARD_REQUIRED YES RUNTIME_OUTPUT_DIRECTORY examples) endforeach() diff --git a/blepp/lescan.h b/blepp/lescan.h index 9589058..09fe0b3 100644 --- a/blepp/lescan.h +++ b/blepp/lescan.h @@ -30,9 +30,10 @@ #include #include #include -#include +#include #include //for UUID. FIXME mofo #include +#include namespace BLEPP { @@ -79,8 +80,8 @@ namespace BLEPP bool uuid_32_bit_complete=0; bool uuid_128_bit_complete=0; - boost::optional local_name; - boost::optional flags; + std::optional local_name; + std::optional flags; std::vector> manufacturer_specific_data; std::vector> service_data; diff --git a/examples/lescan.cc b/examples/lescan.cc index 4da5641..f21994d 100644 --- a/examples/lescan.cc +++ b/examples/lescan.cc @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include