From 857d168d08d6482e3c8492285e5bdde895f0f1e4 Mon Sep 17 00:00:00 2001 From: yumetodo Date: Tue, 28 Jan 2020 14:43:40 +0900 Subject: [PATCH] feat: provide explicit operator bool --- input.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/input.hpp b/input.hpp index 67c9053..426e7c4 100644 --- a/input.hpp +++ b/input.hpp @@ -653,6 +653,17 @@ namespace utils { } + //-----------------------------------------------------------------// + /*! + @brief 変換ステータスを返す + @return 変換が全て正常なら「true」 + */ + //-----------------------------------------------------------------// + explicit operator bool() const noexcept { + return error_ == error::none; + } + + //-----------------------------------------------------------------// /*! @brief 正常変換数を取得