From e399a5bc162f73d2efe91e11fec17e9e5fe5ed42 Mon Sep 17 00:00:00 2001 From: William Katz Date: Sat, 31 Jul 2021 22:44:40 -0700 Subject: [PATCH] constexpr will fail but inline, is more portable --- src/bank.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bank.cpp b/src/bank.cpp index df7312e..a8741e6 100644 --- a/src/bank.cpp +++ b/src/bank.cpp @@ -28,7 +28,7 @@ using namespace drogon; #define SET_CHANGES_ON #endif -__attribute__((always_inline)) inline bool ValidUsername(const std::string &name) noexcept +constexpr bool ValidUsername(const std::string &name) noexcept { if (name.size() < min_name_size || name.size() > max_name_size) {