Skip to content

Instantly share code, notes, and snippets.

@Zitrax
Zitrax / stringformat_constexpr_if.cpp
Last active Jun 21, 2022
stringformat with constexpr if
View stringformat_constexpr_if.cpp
#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) {