Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jarro2783/cxxopts.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarryd Beck <jarro.2783@gmail.com>2022-07-18 14:16:04 +0300
committerJarryd Beck <jarro.2783@gmail.com>2022-07-18 14:16:04 +0300
commit884955139898cefbabd61cb48844d336a053f11f (patch)
tree70eda7043021c0073d3a4fb9d5ea38ac879defda
parente976f964c3ee6a4f6faa836ecb38f3ff8b043114 (diff)
Fix #353.
Move nodiscard before inline.
-rw-r--r--include/cxxopts.hpp2
-rw-r--r--src/CMakeLists.txt2
2 files changed, 3 insertions, 1 deletions
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)