mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Workaround X11 madness (#1388)
This commit is contained in:
@ -2178,8 +2178,8 @@ template <typename Char> struct arg_ref {
|
|||||||
|
|
||||||
arg_id_kind kind;
|
arg_id_kind kind;
|
||||||
union value {
|
union value {
|
||||||
FMT_CONSTEXPR value() : index(0u) {}
|
FMT_CONSTEXPR value() : index{0u} {}
|
||||||
FMT_CONSTEXPR value(int id) : index(id) {}
|
FMT_CONSTEXPR value(int id) : index{id} {}
|
||||||
FMT_CONSTEXPR value(basic_string_view<Char> n) : name(n) {}
|
FMT_CONSTEXPR value(basic_string_view<Char> n) : name(n) {}
|
||||||
|
|
||||||
int index;
|
int index;
|
||||||
|
@ -20,8 +20,14 @@
|
|||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Check if fmt/format.h compiles with the X11 index macro defined.
|
||||||
|
#define index(x, y) no nice things
|
||||||
|
|
||||||
#include "fmt/color.h"
|
#include "fmt/color.h"
|
||||||
#include "fmt/format.h"
|
#include "fmt/format.h"
|
||||||
|
|
||||||
|
#undef index
|
||||||
|
|
||||||
#include "gmock.h"
|
#include "gmock.h"
|
||||||
#include "gtest-extra.h"
|
#include "gtest-extra.h"
|
||||||
#include "mock-allocator.h"
|
#include "mock-allocator.h"
|
||||||
|
Reference in New Issue
Block a user