From 884955139898cefbabd61cb48844d336a053f11f Mon Sep 17 00:00:00 2001 From: Jarryd Beck Date: Mon, 18 Jul 2022 21:16:04 +1000 Subject: Fix #353. Move nodiscard before inline. --- include/cxxopts.hpp | 2 +- src/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index 6fd5be7..d0f9106 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -1248,8 +1248,8 @@ value(T& t) class OptionAdder; -inline CXXOPTS_NODISCARD +inline const std::string& first_or_empty(const OptionNames& long_names) { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 451d778..3b222e4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -20,3 +20,5 @@ add_executable(example example.cpp) target_link_libraries(example cxxopts) + +set_property(TARGET example PROPERTY CXX_STANDARD 17) -- cgit v1.2.3