constexpr will fail but inline, is more portable

This commit is contained in:
William Katz 2021-07-31 22:44:40 -07:00 committed by GitHub
parent 09408ae800
commit e399a5bc16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
{