File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,17 @@ struct ArraySelector final
9696{
9797 static constexpr std::size_t Index = ArraySelector<T, N + 1 >::Index;
9898};
99+
100+ template <>
101+ struct ArraySelector <std::string> final {
102+ static constexpr std::size_t Index = Value::VariantType::IndexOf::string;
103+ };
104+
105+ template <>
106+ struct ArraySelector <char > final {
107+ static constexpr std::size_t Index = Value::VariantType::IndexOf::natural8;
108+ };
109+
99110template <typename T, std::size_t N>
100111struct ArraySelector <
101112 T,
@@ -109,6 +120,7 @@ struct ArraySelector<
109120 static constexpr std::size_t Index = N;
110121};
111122static_assert (ArraySelector<bool >::Index == Value::VariantType::IndexOf::bit);
123+ static_assert (ArraySelector<std::string>::Index == Value::VariantType::IndexOf::string);
112124static_assert (ArraySelector<std::uint8_t >::Index == Value::VariantType::IndexOf::natural8);
113125static_assert (ArraySelector<std::uint32_t >::Index == Value::VariantType::IndexOf::natural32);
114126static_assert (ArraySelector<std::int8_t >::Index == Value::VariantType::IndexOf::integer8);
You can’t perform that action at this time.
0 commit comments