From 50c91a0bcc5e26d45eeac52dfe397949dcfa9920 Mon Sep 17 00:00:00 2001 From: Zhihao Yuan Date: Sat, 16 Nov 2019 21:17:53 -0600 Subject: [PATCH] Clang-format the code --- include/argparse.hpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/include/argparse.hpp b/include/argparse.hpp index 724fa58..3a5ff34 100644 --- a/include/argparse.hpp +++ b/include/argparse.hpp @@ -201,8 +201,8 @@ public: if (mIsOptional) { if (mIsUsed && mValues.size() != mNumArgs && !mDefaultValue.has_value()) { std::stringstream stream; - stream << mUsedName << ": expected " << mNumArgs - << " argument(s). " << mValues.size() << " provided."; + stream << mUsedName << ": expected " << mNumArgs << " argument(s). " + << mValues.size() << " provided."; throw std::runtime_error(stream.str()); } else { // TODO: check if an implicit value was programmed for this argument @@ -220,8 +220,8 @@ public: } else { if (mValues.size() != mNumArgs && !mDefaultValue.has_value()) { std::stringstream stream; - stream << mUsedName << ": expected " << mNumArgs - << " argument(s). " << mValues.size() << " provided."; + stream << mUsedName << ": expected " << mNumArgs << " argument(s). " + << mValues.size() << " provided."; throw std::runtime_error(stream.str()); } } @@ -256,7 +256,8 @@ public: * @throws std::logic_error in case of incompatible types */ template - std::enable_if_t, bool> operator==(const T &aRhs) const { + std::enable_if_t, bool> + operator==(const T &aRhs) const { return get() == aRhs; } @@ -265,7 +266,8 @@ public: * @throws std::logic_error in case of incompatible types */ template - std::enable_if_t, bool> operator==(const T &aRhs) const { + std::enable_if_t, bool> + operator==(const T &aRhs) const { using ValueType = typename T::value_type; auto tLhs = get(); if (tLhs.size() != aRhs.size()) @@ -326,7 +328,8 @@ private: * Getter for container types * @throws std::logic_error in case of incompatible types */ - template details::enable_if_container get() const { + template + details::enable_if_container get() const { using ValueType = typename CONTAINER::value_type; CONTAINER tResult; if (!mValues.empty()) {