From 48fe97835b35023b9fb1668b73d6baa421b70755 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 2 Oct 2016 09:36:40 -0700 Subject: [PATCH] Add format_arg::operator bool --- fmt/format.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fmt/format.h b/fmt/format.h index d5249326..27137d4d 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -1031,6 +1031,8 @@ struct Value { // allow storage in internal::MemoryBuffer. struct format_arg : internal::Value { Type type; + + explicit operator bool() const noexcept { return type != NONE; } }; namespace internal {