aboutsummaryrefslogtreecommitdiff
path: root/src/conversion.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-14 18:02:18 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:56 +0200
commitdc6222611ad14a33f642396558ba84ecba9d6605 (patch)
treed759020233b66be62c5539209a03842d283b67a9 /src/conversion.hpp
parentdbab54ebf134b6ab2cf719d7c26a191fbffeed34 (diff)
perf: add noexcept almost everywhere
Diffstat (limited to 'src/conversion.hpp')
-rw-r--r--src/conversion.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conversion.hpp b/src/conversion.hpp
index f915606..9f6f933 100644
--- a/src/conversion.hpp
+++ b/src/conversion.hpp
@@ -10,7 +10,7 @@ class ConversionResult
{
public:
explicit ConversionResult(const bool &success_, const ResultType &result_,
- const std::string_view &fail_reason_ = "")
+ const std::string_view &fail_reason_ = "") noexcept
: success(success_), result(result_), fail_reason(fail_reason_)
{
}
@@ -29,4 +29,4 @@ static constexpr auto IS_UINT_IN_RANGE = ctll::fixed_string("^[0-9]{1,19}$");
* @param str A string that possibly is a unsigned integer
* @returns A conversion result
*/
-ConversionResult<uint32_t> str_to_uint(const std::string_view &str);
+ConversionResult<uint32_t> str_to_uint(const std::string_view &str) noexcept;