mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 15:14:39 +00:00
Fixed clang tidy warning about struct name
This commit is contained in:
parent
6d49d5ee1b
commit
fd726fd341
@ -362,7 +362,7 @@ struct can_invoke_to_string {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_choice_type_supported {
|
struct IsChoiceTypeSupported {
|
||||||
using CleanType = typename std::decay<T>::type;
|
using CleanType = typename std::decay<T>::type;
|
||||||
static const bool value = std::is_integral<CleanType>::value ||
|
static const bool value = std::is_integral<CleanType>::value ||
|
||||||
std::is_same<CleanType, std::string>::value ||
|
std::is_same<CleanType, std::string>::value ||
|
||||||
@ -555,7 +555,7 @@ public:
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void add_choice(T&& choice) {
|
void add_choice(T&& choice) {
|
||||||
static_assert(details::is_choice_type_supported<T>::value, "Only string or integer type supported for choice");
|
static_assert(details::IsChoiceTypeSupported<T>::value, "Only string or integer type supported for choice");
|
||||||
static_assert(std::is_convertible_v<T, std::string_view> || details::can_invoke_to_string<T>::value, "Choice is not convertible to string_type");
|
static_assert(std::is_convertible_v<T, std::string_view> || details::can_invoke_to_string<T>::value, "Choice is not convertible to string_type");
|
||||||
if (!m_choices.has_value()) {
|
if (!m_choices.has_value()) {
|
||||||
m_choices = std::vector<std::string>{};
|
m_choices = std::vector<std::string>{};
|
||||||
|
Loading…
Reference in New Issue
Block a user