From fe18603843ceb4d7090979a89d7e26418b02d87f Mon Sep 17 00:00:00 2001 From: djcb Date: Fri, 27 Oct 2017 18:40:37 +0300 Subject: [PATCH] parser: fix some post-c++14 code don't require anything post c++14 --- lib/parser/tree.hh | 2 +- lib/parser/utils.cc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/parser/tree.hh b/lib/parser/tree.hh index 6ceaaa9d..8303eede 100644 --- a/lib/parser/tree.hh +++ b/lib/parser/tree.hh @@ -47,7 +47,7 @@ struct Node { Type type; std::unique_ptr data; - static constexpr const char* type_name (Type t) { + static const char* type_name (Type t) { switch (t) { case Type::Empty: return ""; break; case Type::OpAnd: return "and"; break; diff --git a/lib/parser/utils.cc b/lib/parser/utils.cc index a21b26cc..105c0f58 100644 --- a/lib/parser/utils.cc +++ b/lib/parser/utils.cc @@ -161,8 +161,8 @@ Mux::quote (const std::string& str) constexpr const auto InternalDateFormat = "%010" G_GINT64_FORMAT; constexpr const char InternalDateMin[] = "0000000000"; constexpr const char InternalDateMax[] = "9999999999"; -static_assert(sizeof(InternalDateMin) == 10 + 1); -static_assert(sizeof(InternalDateMax) == 10 + 1); +static_assert(sizeof(InternalDateMin) == 10 + 1, "invalid"); +static_assert(sizeof(InternalDateMax) == 10 + 1, "invalid"); static std::string date_boundary (bool is_first) @@ -304,8 +304,8 @@ constexpr const auto SizeFormat = "%010" G_GINT64_FORMAT; constexpr const char SizeMin[] = "0000000000"; constexpr const char SizeMax[] = "9999999999"; -static_assert(sizeof(SizeMin) == 10 + 1); -static_assert(sizeof(SizeMax) == 10 + 1); +static_assert(sizeof(SizeMin) == 10 + 1, "invalid"); +static_assert(sizeof(SizeMax) == 10 + 1, "invalid"); static std::string size_boundary (bool is_first)