diff options
Diffstat (limited to 'absl/flags/internal/flag.h')
-rw-r--r-- | absl/flags/internal/flag.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/absl/flags/internal/flag.h b/absl/flags/internal/flag.h index 6154638c..b41f9a69 100644 --- a/absl/flags/internal/flag.h +++ b/absl/flags/internal/flag.h @@ -121,7 +121,7 @@ inline void* Clone(FlagOpFn op, const void* obj) { flags_internal::CopyConstruct(op, obj, res); return res; } -// Returns true if parsing of input text is successfull. +// Returns true if parsing of input text is successful. inline bool Parse(FlagOpFn op, absl::string_view text, void* dst, std::string* error) { return op(FlagOp::kParse, &text, dst, error) != nullptr; @@ -139,12 +139,12 @@ inline size_t Sizeof(FlagOpFn op) { return static_cast<size_t>(reinterpret_cast<intptr_t>( op(FlagOp::kSizeof, nullptr, nullptr, nullptr))); } -// Returns fast type id coresponding to the value type. +// Returns fast type id corresponding to the value type. inline FlagFastTypeId FastTypeId(FlagOpFn op) { return reinterpret_cast<FlagFastTypeId>( op(FlagOp::kFastTypeId, nullptr, nullptr, nullptr)); } -// Returns fast type id coresponding to the value type. +// Returns fast type id corresponding to the value type. inline const std::type_info* RuntimeTypeId(FlagOpFn op) { return reinterpret_cast<const std::type_info*>( op(FlagOp::kRuntimeTypeId, nullptr, nullptr, nullptr)); @@ -223,12 +223,12 @@ extern const char kStrippedFlagHelp[]; // first overload if possible. If help message is evaluatable on constexpr // context We'll be able to make FixedCharArray out of it and we'll choose first // overload. In this case the help message expression is immediately evaluated -// and is used to construct the absl::Flag. No additionl code is generated by +// and is used to construct the absl::Flag. No additional code is generated by // ABSL_FLAG Otherwise SFINAE kicks in and first overload is dropped from the // consideration, in which case the second overload will be used. The second // overload does not attempt to evaluate the help message expression -// immediately and instead delays the evaluation by returing the function -// pointer (&T::NonConst) genering the help message when necessary. This is +// immediately and instead delays the evaluation by returning the function +// pointer (&T::NonConst) generating the help message when necessary. This is // evaluatable in constexpr context, but the cost is an extra function being // generated in the ABSL_FLAG code. template <typename Gen, size_t N> @@ -308,19 +308,20 @@ constexpr int64_t UninitializedFlagValue() { } template <typename T> -using FlagUseValueAndInitBitStorage = std::integral_constant< - bool, absl::type_traits_internal::is_trivially_copyable<T>::value && - std::is_default_constructible<T>::value && (sizeof(T) < 8)>; +using FlagUseValueAndInitBitStorage = + std::integral_constant<bool, std::is_trivially_copyable<T>::value && + std::is_default_constructible<T>::value && + (sizeof(T) < 8)>; template <typename T> -using FlagUseOneWordStorage = std::integral_constant< - bool, absl::type_traits_internal::is_trivially_copyable<T>::value && - (sizeof(T) <= 8)>; +using FlagUseOneWordStorage = + std::integral_constant<bool, std::is_trivially_copyable<T>::value && + (sizeof(T) <= 8)>; template <class T> -using FlagUseSequenceLockStorage = std::integral_constant< - bool, absl::type_traits_internal::is_trivially_copyable<T>::value && - (sizeof(T) > 8)>; +using FlagUseSequenceLockStorage = + std::integral_constant<bool, std::is_trivially_copyable<T>::value && + (sizeof(T) > 8)>; enum class FlagValueStorageKind : uint8_t { kValueAndInitBit = 0, |