Finxing build issues. (Not complete)
This commit is contained in:
parent
7a1a67ff93
commit
833bfe3749
@ -1007,7 +1007,7 @@ template <typename Context> class basic_format_arg {
|
|||||||
|
|
||||||
template <typename ContextType>
|
template <typename ContextType>
|
||||||
friend FMT_CONSTEXPR basic_format_arg<ContextType> internal::make_arg(
|
friend FMT_CONSTEXPR basic_format_arg<ContextType> internal::make_arg(
|
||||||
const named_arg_base<typename ContextType::char_type>& value);
|
const internal::named_arg_base<typename ContextType::char_type>& value);
|
||||||
|
|
||||||
template <typename Visitor, typename Ctx>
|
template <typename Visitor, typename Ctx>
|
||||||
friend FMT_CONSTEXPR auto visit_format_arg(Visitor&& vis,
|
friend FMT_CONSTEXPR auto visit_format_arg(Visitor&& vis,
|
||||||
|
|||||||
@ -36,7 +36,7 @@ struct is_string_view<std::basic_string_view<Char, Traits>, Char>
|
|||||||
|
|
||||||
#ifdef FMT_USE_EXPERIMENTAL_STRING_VIEW
|
#ifdef FMT_USE_EXPERIMENTAL_STRING_VIEW
|
||||||
template<typename Traits, typename Char>
|
template<typename Traits, typename Char>
|
||||||
struct is_string_view<std::expeimental::basic_string_view<Char, Traits>, Char>
|
struct is_string_view<std::experimental::basic_string_view<Char, Traits>, Char>
|
||||||
: std::true_type{};
|
: std::true_type{};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ TEST(FormatDynArgsTest, StringsAndRefs) {
|
|||||||
char str[]{"1234567890"};
|
char str[]{"1234567890"};
|
||||||
store.push_back(str);
|
store.push_back(str);
|
||||||
store.push_back(std::cref(str));
|
store.push_back(std::cref(str));
|
||||||
store.push_back(std::string_view{str});
|
store.push_back(fmt::string_view{str});
|
||||||
str[0] = 'X';
|
str[0] = 'X';
|
||||||
|
|
||||||
std::string result = fmt::vformat(
|
std::string result = fmt::vformat(
|
||||||
@ -76,7 +76,8 @@ TEST(FormatDynArgsTest, CustomFormat) {
|
|||||||
TEST(FormatDynArgsTest, NamedArgByRef) {
|
TEST(FormatDynArgsTest, NamedArgByRef) {
|
||||||
fmt::dynamic_format_arg_store<fmt::format_context> store;
|
fmt::dynamic_format_arg_store<fmt::format_context> store;
|
||||||
auto a1 = fmt::arg("a1_", 42);
|
auto a1 = fmt::arg("a1_", 42);
|
||||||
store.push_back(std::cref(a1));
|
auto ref = std::cref(a1);
|
||||||
|
store.push_back(ref);
|
||||||
|
|
||||||
std::string result = fmt::vformat(
|
std::string result = fmt::vformat(
|
||||||
"{a1_}", // and {} and {}",
|
"{a1_}", // and {} and {}",
|
||||||
@ -106,6 +107,8 @@ TEST(FormatDynArgsTest, NamedStrings) {
|
|||||||
EXPECT_EQ("1234567890 and X234567890", result);
|
EXPECT_EQ("1234567890 and X234567890", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FMT_HAS_VARIANT
|
||||||
|
|
||||||
TEST(FormatDynArgsTest, NamedCustomFormat) {
|
TEST(FormatDynArgsTest, NamedCustomFormat) {
|
||||||
fmt::dynamic_format_arg_store<fmt::format_context, Custom> store;
|
fmt::dynamic_format_arg_store<fmt::format_context, Custom> store;
|
||||||
Custom c{};
|
Custom c{};
|
||||||
@ -122,3 +125,5 @@ TEST(FormatDynArgsTest, NamedCustomFormat) {
|
|||||||
|
|
||||||
EXPECT_EQ("cust=0 and cust=1 and cust=3", result);
|
EXPECT_EQ("cust=0 and cust=1 and cust=3", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // FMT_HAS_VARIANT
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user