Compiling and running the following code
#include "format.h"
struct Foo {};
void format(fmt::BasicFormatter<char> &f, const char *&, Foo) {}
int main() {
fmt::print("{}", Foo());
}
results in segfault:
$ clang++ -std=c++11 -O1 test.cc format.cc
$ ./a.out
Segmentation fault: 11
Only occurs if optimization enabled and with -std=c++11.