Mercurial > code
changeset 646:cba9782e10a7
is_number: use trailing return syntax
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 01 Aug 2018 14:08:19 +0200 |
parents | 2968cc4edd4c |
children | 0557eea4d373 |
files | cpp/is_number/is_number.hpp |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/cpp/is_number/is_number.hpp Wed Aug 01 14:06:59 2018 +0200 +++ b/cpp/is_number/is_number.hpp Wed Aug 01 14:08:19 2018 +0200 @@ -29,7 +29,7 @@ * \param base the optional base * \return true if integer */ -inline bool is_int(const std::string& str, int base = 10) noexcept +inline auto is_int(const std::string& str, int base = 10) noexcept -> bool { if (str.empty()) return false; @@ -47,7 +47,7 @@ * \param value the value * \return true if real */ -inline bool is_real(const std::string &str) noexcept +inline auto is_real(const std::string &str) noexcept -> bool { if (str.empty()) return false; @@ -65,7 +65,7 @@ * \param value the value * \return true if it is a number */ -inline bool is_number(const std::string& str) noexcept +inline auto is_number(const std::string& str) noexcept -> bool { return is_int(str) || is_real(str); }