From 718fe426bfc13240fe2af3fe8063114aa0b1a5c7 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Wed, 21 Jan 2026 19:22:50 +0800 Subject: [PATCH] fix: fix clap option ctor signature error --- src/yycc/carton/clap/option.cpp | 2 +- src/yycc/carton/clap/option.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yycc/carton/clap/option.cpp b/src/yycc/carton/clap/option.cpp index a50f7a3..925b1c0 100644 --- a/src/yycc/carton/clap/option.cpp +++ b/src/yycc/carton/clap/option.cpp @@ -12,7 +12,7 @@ namespace yycc::carton::clap::option { Option::Option(std::optional short_name, std::optional long_name, std::optional value_hint, - const std::u8string& description) : + const std::u8string_view& description) : short_name(short_name), long_name(long_name), value_hint(value_hint), description(description) { if (!short_name.has_value() && !long_name.has_value()) { throw std::logic_error("must have at least one name, short or long name"); diff --git a/src/yycc/carton/clap/option.hpp b/src/yycc/carton/clap/option.hpp index 533ef5a..07ce09a 100644 --- a/src/yycc/carton/clap/option.hpp +++ b/src/yycc/carton/clap/option.hpp @@ -23,7 +23,7 @@ namespace yycc::carton::clap::option { Option(std::optional short_name, std::optional long_name, std::optional value_hint, - const std::u8string& description); + const std::u8string_view& description); ~Option(); YYCC_DEFAULT_COPY_MOVE(Option)