Skip to content

Instantly share code, notes, and snippets.

@Zitrax
Zitrax / stringformat_constexpr_if.cpp
Last active November 7, 2023 23:06
stringformat with constexpr if
#include <string>
#include <iostream>
#include <memory>
/**
* Convert all std::strings to const char* using constexpr if (C++17)
*/
template<typename T>
auto convert(T&& t) {