attempt stripping void casts
This commit is contained in:
parent
b9063f9392
commit
98a8830d2a
@ -20,21 +20,21 @@
|
|||||||
|
|
||||||
// Exercise the API to verify that everything we expect to can compile.
|
// Exercise the API to verify that everything we expect to can compile.
|
||||||
void test_format_api() {
|
void test_format_api() {
|
||||||
(void)fmt::format(FMT_STRING("{}"), 42);
|
fmt::format(FMT_STRING("{}"), 42);
|
||||||
(void)fmt::format(FMT_STRING(L"{}"), 42);
|
fmt::format(FMT_STRING(L"{}"), 42);
|
||||||
(void)fmt::format(FMT_STRING("noop"));
|
fmt::format(FMT_STRING("noop"));
|
||||||
|
|
||||||
(void)fmt::to_string(42);
|
fmt::to_string(42);
|
||||||
(void)fmt::to_wstring(42);
|
fmt::to_wstring(42);
|
||||||
|
|
||||||
std::list<char> out;
|
std::list<char> out;
|
||||||
fmt::format_to(std::back_inserter(out), FMT_STRING("{}"), 42);
|
fmt::format_to(std::back_inserter(out), FMT_STRING("{}"), 42);
|
||||||
|
|
||||||
char buffer[4];
|
char buffer[4];
|
||||||
(void)fmt::format_to_n(buffer, 3, FMT_STRING("{}"), 12345);
|
fmt::format_to_n(buffer, 3, FMT_STRING("{}"), 12345);
|
||||||
|
|
||||||
wchar_t wbuffer[4];
|
wchar_t wbuffer[4];
|
||||||
(void)fmt::format_to_n(wbuffer, 3, FMT_STRING(L"{}"), 12345);
|
fmt::format_to_n(wbuffer, 3, FMT_STRING(L"{}"), 12345);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_literals_api() {
|
void test_literals_api() {
|
||||||
@ -46,13 +46,13 @@ void test_literals_api() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void test_chrono() {
|
void test_chrono() {
|
||||||
(void)fmt::format(FMT_STRING("{}"), std::chrono::seconds(42));
|
fmt::format(FMT_STRING("{}"), std::chrono::seconds(42));
|
||||||
(void)fmt::format(FMT_STRING(L"{}"), std::chrono::seconds(42));
|
fmt::format(FMT_STRING(L"{}"), std::chrono::seconds(42));
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_text_style() {
|
void test_text_style() {
|
||||||
fmt::print(fg(fmt::rgb(255, 20, 30)), FMT_STRING("{}"), "rgb(255,20,30)");
|
fmt::print(fg(fmt::rgb(255, 20, 30)), FMT_STRING("{}"), "rgb(255,20,30)");
|
||||||
(void)fmt::format(fg(fmt::rgb(255, 20, 30)), FMT_STRING("{}"),
|
fmt::format(fg(fmt::rgb(255, 20, 30)), FMT_STRING("{}"),
|
||||||
"rgb(255,20,30)");
|
"rgb(255,20,30)");
|
||||||
|
|
||||||
fmt::text_style ts = fg(fmt::rgb(255, 20, 30));
|
fmt::text_style ts = fg(fmt::rgb(255, 20, 30));
|
||||||
@ -63,7 +63,7 @@ void test_text_style() {
|
|||||||
|
|
||||||
void test_range() {
|
void test_range() {
|
||||||
std::array<char, 5> hello = {'h','e','l','l','o'};
|
std::array<char, 5> hello = {'h','e','l','l','o'};
|
||||||
(void)fmt::format(FMT_STRING("{}"), hello);
|
fmt::format(FMT_STRING("{}"), hello);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user