diff --git a/icu4c/source/common/unicode/simpleformatter.h b/icu4c/source/common/unicode/simpleformatter.h index 7f58106fadb..33bdd6d48fc 100644 --- a/icu4c/source/common/unicode/simpleformatter.h +++ b/icu4c/source/common/unicode/simpleformatter.h @@ -25,11 +25,9 @@ U_NAMESPACE_BEGIN // Forward declaration: -namespace number { -namespace impl { +namespace number::impl { class SimpleModifier; } -} /** * Formats simple patterns like "{1} was born in {0}". diff --git a/icu4c/source/i18n/double-conversion-cached-powers.cpp b/icu4c/source/i18n/double-conversion-cached-powers.cpp index 3bc35c8aaf8..ad6ea927309 100644 --- a/icu4c/source/i18n/double-conversion-cached-powers.cpp +++ b/icu4c/source/i18n/double-conversion-cached-powers.cpp @@ -47,9 +47,7 @@ // ICU PATCH: Wrap in ICU namespace U_NAMESPACE_BEGIN -namespace double_conversion { - -namespace PowersOfTenCache { +namespace double_conversion::PowersOfTenCache { struct CachedPower { uint64_t significand; @@ -184,9 +182,7 @@ void GetCachedPowerForDecimalExponent(int requested_exponent, DOUBLE_CONVERSION_ASSERT(requested_exponent < *found_exponent + kDecimalExponentDistance); } -} // namespace PowersOfTenCache - -} // namespace double_conversion +} // namespace double_conversion::PowersOfTenCache // ICU PATCH: Close ICU namespace U_NAMESPACE_END diff --git a/icu4c/source/i18n/double-conversion-cached-powers.h b/icu4c/source/i18n/double-conversion-cached-powers.h index ade27baef8b..78e70378d9a 100644 --- a/icu4c/source/i18n/double-conversion-cached-powers.h +++ b/icu4c/source/i18n/double-conversion-cached-powers.h @@ -44,9 +44,7 @@ // ICU PATCH: Wrap in ICU namespace U_NAMESPACE_BEGIN -namespace double_conversion { - -namespace PowersOfTenCache { +namespace double_conversion::PowersOfTenCache { // Not all powers of ten are cached. The decimal exponent of two neighboring // cached numbers will differ by kDecimalExponentDistance. @@ -71,9 +69,7 @@ namespace PowersOfTenCache { DiyFp* power, int* found_exponent); -} // namespace PowersOfTenCache - -} // namespace double_conversion +} // namespace double_conversion::PowersOfTenCache // ICU PATCH: Close ICU namespace U_NAMESPACE_END diff --git a/icu4c/source/i18n/measunit_impl.h b/icu4c/source/i18n/measunit_impl.h index c60ff2fc33b..5ee5c7bb95d 100644 --- a/icu4c/source/i18n/measunit_impl.h +++ b/icu4c/source/i18n/measunit_impl.h @@ -14,11 +14,9 @@ U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { class LongNameHandler; } -} // namespace number static const char16_t kDefaultCurrency[] = u"XXX"; static const char kDefaultCurrency8[] = "XXX"; diff --git a/icu4c/source/i18n/number_affixutils.h b/icu4c/source/i18n/number_affixutils.h index 5cfde61ffd0..e59096546e1 100644 --- a/icu4c/source/i18n/number_affixutils.h +++ b/icu4c/source/i18n/number_affixutils.h @@ -14,8 +14,8 @@ #include "formatted_string_builder.h" #include "unicode/uniset.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { enum AffixPatternState { STATE_BASE = 0, @@ -234,8 +234,7 @@ class U_I18N_API AffixUtils { } }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/icu4c/source/i18n/number_asformat.h b/icu4c/source/i18n/number_asformat.h index f921b429420..f447e0c4b0a 100644 --- a/icu4c/source/i18n/number_asformat.h +++ b/icu4c/source/i18n/number_asformat.h @@ -18,8 +18,8 @@ #include "decNumber.h" #include "charstr.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { /** * A wrapper around LocalizedNumberFormatter implementing the Format interface, enabling improved @@ -97,8 +97,7 @@ class U_I18N_API LocalizedNumberFormatterAsFormat : public Format { Locale fLocale; }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif // __NUMBER_ASFORMAT_H__ diff --git a/icu4c/source/i18n/number_capi.cpp b/icu4c/source/i18n/number_capi.cpp index abada9ad869..bc7dc8c4342 100644 --- a/icu4c/source/i18n/number_capi.cpp +++ b/icu4c/source/i18n/number_capi.cpp @@ -25,8 +25,7 @@ using namespace icu::number::impl; U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { /** * Implementation class for UNumberFormatter. Wraps a LocalizedNumberFormatter. @@ -84,8 +83,7 @@ void UFormattedNumberImpl::setTo(FormattedNumber value) { fData = std::move(*value.fData); } -} -} +} // namespace number::impl U_NAMESPACE_END diff --git a/icu4c/source/i18n/number_compact.h b/icu4c/source/i18n/number_compact.h index aee1df74523..95896c029a2 100644 --- a/icu4c/source/i18n/number_compact.h +++ b/icu4c/source/i18n/number_compact.h @@ -14,8 +14,8 @@ #include "resource.h" #include "number_patternmodifier.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { static const int32_t COMPACT_MAX_DIGITS = 20; @@ -90,9 +90,7 @@ class CompactHandler : public MicroPropsGenerator, public UMemory { void precomputeAllModifiers(MutablePatternModifier &buildReference, UErrorCode &status); }; - -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__NUMBER_COMPACT_H__ diff --git a/icu4c/source/i18n/number_currencysymbols.h b/icu4c/source/i18n/number_currencysymbols.h index c2223bd0f0b..13b9a9691be 100644 --- a/icu4c/source/i18n/number_currencysymbols.h +++ b/icu4c/source/i18n/number_currencysymbols.h @@ -11,9 +11,8 @@ #include "charstr.h" #include "number_decimfmtprops.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { - +U_NAMESPACE_BEGIN +namespace number::impl { // Exported as U_I18N_API for tests class U_I18N_API CurrencySymbols : public UMemory { @@ -62,9 +61,7 @@ class U_I18N_API CurrencySymbols : public UMemory { CurrencyUnit resolveCurrency(const DecimalFormatProperties& properties, const Locale& locale, UErrorCode& status); - -} // namespace impl -} // namespace numparse +} // namespace number::impl U_NAMESPACE_END #endif //__SOURCE_NUMBER_CURRENCYSYMBOLS_H__ diff --git a/icu4c/source/i18n/number_decimalquantity.h b/icu4c/source/i18n/number_decimalquantity.h index 2211fe9c19e..f3eb17d9225 100644 --- a/icu4c/source/i18n/number_decimalquantity.h +++ b/icu4c/source/i18n/number_decimalquantity.h @@ -13,8 +13,8 @@ #include "plurrule_impl.h" #include "number_types.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { // Forward-declare (maybe don't want number_utils.h included here): class DecNum; @@ -549,8 +549,7 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory { void switchStorage(); }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/icu4c/source/i18n/number_decimfmtprops.h b/icu4c/source/i18n/number_decimfmtprops.h index 5f72f649842..6cf4b4c108a 100644 --- a/icu4c/source/i18n/number_decimfmtprops.h +++ b/icu4c/source/i18n/number_decimfmtprops.h @@ -33,8 +33,7 @@ template class U_I18N_API LocalPointer; #endif #endif -namespace number { -namespace impl { +namespace number::impl { // Exported as U_I18N_API because it is a public member field of exported DecimalFormatProperties // Using this wrapper is rather unfortunate, but is needed on Windows platforms in order to allow @@ -166,8 +165,8 @@ struct U_I18N_API DecimalFormatProperties : public UMemory { bool _equals(const DecimalFormatProperties& other, bool ignoreForFastFormat) const; }; -} // namespace impl -} // namespace number +} // namespace number::impl + U_NAMESPACE_END diff --git a/icu4c/source/i18n/number_decnum.h b/icu4c/source/i18n/number_decnum.h index 94a0b31bcb5..2bf9fd39cd9 100644 --- a/icu4c/source/i18n/number_decnum.h +++ b/icu4c/source/i18n/number_decnum.h @@ -22,8 +22,7 @@ U_NAMESPACE_BEGIN template class U_I18N_API MaybeStackHeaderAndArray; #endif -namespace number { -namespace impl { +namespace number::impl { /** A very thin C++ wrapper around decNumber.h */ // Exported as U_I18N_API for tests @@ -84,8 +83,7 @@ class U_I18N_API DecNum : public UMemory { void _setTo(const char* str, int32_t maxDigits, UErrorCode& status); }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/icu4c/source/i18n/number_formatimpl.h b/icu4c/source/i18n/number_formatimpl.h index 62d53212616..ba979d8bdc6 100644 --- a/icu4c/source/i18n/number_formatimpl.h +++ b/icu4c/source/i18n/number_formatimpl.h @@ -18,8 +18,8 @@ #include "number_microprops.h" #include "number_utypes.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { /** * This is the "brain" of the number formatting pipeline. It ties all the pieces together, taking in a MacroProps and a @@ -170,8 +170,7 @@ class NumberFormatterImpl : public UMemory { UErrorCode &status); }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/icu4c/source/i18n/number_longnames.h b/icu4c/source/i18n/number_longnames.h index 56d8c9b24e8..ef1ce74104f 100644 --- a/icu4c/source/i18n/number_longnames.h +++ b/icu4c/source/i18n/number_longnames.h @@ -13,8 +13,8 @@ #include "number_utils.h" #include "number_modifiers.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { // LongNameHandler takes care of formatting currency and measurement unit names, // as well as populating the gender of measure units. @@ -263,8 +263,7 @@ class LongNameMultiplexer : public MicroPropsGenerator, public UMemory { } }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__NUMBER_LONGNAMES_H__ diff --git a/icu4c/source/i18n/number_mapper.h b/icu4c/source/i18n/number_mapper.h index c01607e5688..7c8cf795d5b 100644 --- a/icu4c/source/i18n/number_mapper.h +++ b/icu4c/source/i18n/number_mapper.h @@ -16,9 +16,7 @@ #include "numparse_impl.h" U_NAMESPACE_BEGIN -namespace number { -namespace impl { - +namespace number::impl { class AutoAffixPatternProvider; class CurrencyPluralInfoAffixProvider; @@ -257,9 +255,7 @@ class NumberPropertyMapper { DecimalFormatProperties* exportedProperties, UErrorCode& status); }; - -} // namespace impl -} // namespace numparse +} // namespace number::impl U_NAMESPACE_END #endif //__NUMBER_MAPPER_H__ diff --git a/icu4c/source/i18n/number_microprops.h b/icu4c/source/i18n/number_microprops.h index 18addaae087..6d58bc3c360 100644 --- a/icu4c/source/i18n/number_microprops.h +++ b/icu4c/source/i18n/number_microprops.h @@ -20,8 +20,8 @@ #include "charstr.h" #include "util.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { /** * A copyable container for the integer values of mixed unit measurements. @@ -188,8 +188,7 @@ struct MicroProps : public MicroPropsGenerator { bool exhausted = false; }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif // __NUMBER_MICROPROPS_H__ diff --git a/icu4c/source/i18n/number_modifiers.h b/icu4c/source/i18n/number_modifiers.h index 9df788c260f..1afee495de1 100644 --- a/icu4c/source/i18n/number_modifiers.h +++ b/icu4c/source/i18n/number_modifiers.h @@ -15,8 +15,8 @@ #include "formatted_string_builder.h" #include "number_types.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { /** * The canonical implementation of {@link Modifier}, containing a prefix and suffix string. @@ -350,8 +350,7 @@ class U_I18N_API AdoptingModifierStore : public ModifierStore, public UMemory { AdoptingSignumModifierStore mods[StandardPlural::COUNT] = {}; }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/icu4c/source/i18n/number_multiplier.h b/icu4c/source/i18n/number_multiplier.h index c752935b783..62b04778e85 100644 --- a/icu4c/source/i18n/number_multiplier.h +++ b/icu4c/source/i18n/number_multiplier.h @@ -10,9 +10,8 @@ #include "numparse_types.h" #include "number_decimfmtprops.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { - +U_NAMESPACE_BEGIN +namespace number::impl { /** * Wraps a {@link Multiplier} for use in the number formatting pipeline. @@ -48,9 +47,7 @@ static inline Scale scaleFromProperties(const DecimalFormatProperties& propertie } } - -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__SOURCE_NUMBER_MULTIPLIER_H__ diff --git a/icu4c/source/i18n/number_patternmodifier.h b/icu4c/source/i18n/number_patternmodifier.h index f869ed75d45..4cae160049d 100644 --- a/icu4c/source/i18n/number_patternmodifier.h +++ b/icu4c/source/i18n/number_patternmodifier.h @@ -33,8 +33,7 @@ template class U_I18N_API LocalPointer; #endif #endif -namespace number { -namespace impl { +namespace number::impl { // Forward declaration class MutablePatternModifier; @@ -255,9 +254,8 @@ class U_I18N_API MutablePatternModifier void prepareAffix(bool isPrefix); }; +} // namespace number::impl -} // namespace impl -} // namespace number U_NAMESPACE_END #endif //__NUMBER_PATTERNMODIFIER_H__ diff --git a/icu4c/source/i18n/number_patternstring.h b/icu4c/source/i18n/number_patternstring.h index 989d0d3464b..2b3ab02be0f 100644 --- a/icu4c/source/i18n/number_patternstring.h +++ b/icu4c/source/i18n/number_patternstring.h @@ -16,8 +16,8 @@ #include "number_decimfmtprops.h" #include "number_affixutils.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { // Forward declaration class PatternParser; @@ -330,8 +330,7 @@ class U_I18N_API PatternStringUtils { UErrorCode& status); }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/icu4c/source/i18n/number_roundingutils.h b/icu4c/source/i18n/number_roundingutils.h index 66571272545..08c62dd6aee 100644 --- a/icu4c/source/i18n/number_roundingutils.h +++ b/icu4c/source/i18n/number_roundingutils.h @@ -11,8 +11,7 @@ #include "string_segment.h" U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { namespace roundingutils { enum Section { @@ -238,8 +237,7 @@ class RoundingImpl { */ void parseIncrementOption(const StringSegment &segment, Precision &outPrecision, UErrorCode &status); -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__NUMBER_ROUNDINGUTILS_H__ diff --git a/icu4c/source/i18n/number_scientific.h b/icu4c/source/i18n/number_scientific.h index 4dbc031102f..60122b15511 100644 --- a/icu4c/source/i18n/number_scientific.h +++ b/icu4c/source/i18n/number_scientific.h @@ -9,8 +9,8 @@ #include "number_types.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { // Forward-declare class ScientificHandler; @@ -59,8 +59,7 @@ class ScientificHandler : public UMemory, public MicroPropsGenerator, public Mul friend class ScientificModifier; }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__NUMBER_SCIENTIFIC_H__ diff --git a/icu4c/source/i18n/number_skeletons.h b/icu4c/source/i18n/number_skeletons.h index 27f69cd48c3..47a1a7ace89 100644 --- a/icu4c/source/i18n/number_skeletons.h +++ b/icu4c/source/i18n/number_skeletons.h @@ -13,8 +13,7 @@ #include "string_segment.h" U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { // Forward-declaration struct SeenMacroProps; @@ -385,8 +384,7 @@ UPRV_BLOCK_MACRO_BEGIN { \ } // namespace -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__SOURCE_NUMBER_SKELETONS_H__ diff --git a/icu4c/source/i18n/number_types.h b/icu4c/source/i18n/number_types.h index 825a3c455c9..a67099e5e3b 100644 --- a/icu4c/source/i18n/number_types.h +++ b/icu4c/source/i18n/number_types.h @@ -20,8 +20,7 @@ #include "formatted_string_builder.h" U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { // For convenience and historical reasons, import the Field typedef to the namespace. typedef FormattedStringBuilder::Field Field; @@ -369,9 +368,7 @@ class U_I18N_API NullableValue { T fValue; }; - -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__NUMBER_TYPES_H__ diff --git a/icu4c/source/i18n/number_usageprefs.h b/icu4c/source/i18n/number_usageprefs.h index e90df99d396..9aebc3140cd 100644 --- a/icu4c/source/i18n/number_usageprefs.h +++ b/icu4c/source/i18n/number_usageprefs.h @@ -23,8 +23,7 @@ U_NAMESPACE_BEGIN using ::icu::units::ComplexUnitsConverter; using ::icu::units::UnitsRouter; -namespace number { -namespace impl { +namespace number::impl { /** * A MicroPropsGenerator which uses UnitsRouter to produce output converted to a @@ -62,8 +61,7 @@ class U_I18N_API UsagePrefsHandler : public MicroPropsGenerator, public UMemory const MicroPropsGenerator *fParent; }; -} // namespace impl -} // namespace number +} // namespace number::impl // Export explicit template instantiations of LocalPointerBase and LocalPointer. // This is required when building DLLs for Windows. (See datefmt.h, @@ -84,8 +82,7 @@ template class U_I18N_API LocalPointer; #endif #endif -namespace number { -namespace impl { +namespace number::impl { /** * A MicroPropsGenerator which converts a measurement from one MeasureUnit to @@ -118,8 +115,8 @@ class U_I18N_API UnitConversionHandler : public MicroPropsGenerator, public UMem const MicroPropsGenerator *fParent; }; -} // namespace impl -} // namespace number +} // namespace number::impl + U_NAMESPACE_END #endif // __NUMBER_USAGEPREFS_H__ diff --git a/icu4c/source/i18n/number_utils.h b/icu4c/source/i18n/number_utils.h index bc369c940f7..39c56f4d184 100644 --- a/icu4c/source/i18n/number_utils.h +++ b/icu4c/source/i18n/number_utils.h @@ -21,8 +21,7 @@ U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { enum CldrPatternStyle { CLDR_PATTERN_STYLE_DECIMAL, @@ -102,8 +101,7 @@ inline StandardPlural::Form getPluralSafe( } // namespace utils -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/icu4c/source/i18n/number_utypes.h b/icu4c/source/i18n/number_utypes.h index 0c130401894..9f606f17891 100644 --- a/icu4c/source/i18n/number_utypes.h +++ b/icu4c/source/i18n/number_utypes.h @@ -13,9 +13,8 @@ #include "formatted_string_builder.h" #include "formattedval_impl.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { - +U_NAMESPACE_BEGIN +namespace number::impl { /** Helper function used in upluralrules.cpp */ const DecimalQuantity* validateUFormattedNumberToDecimalQuantity( @@ -50,9 +49,7 @@ public: const char *gender = ""; }; - -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__SOURCE_NUMBER_UTYPES_H__ diff --git a/icu4c/source/i18n/numparse_affixes.h b/icu4c/source/i18n/numparse_affixes.h index 81b633c2626..a9e1c414e8c 100644 --- a/icu4c/source/i18n/numparse_affixes.h +++ b/icu4c/source/i18n/numparse_affixes.h @@ -16,8 +16,8 @@ #include "number_currencysymbols.h" U_NAMESPACE_BEGIN -namespace numparse { -namespace impl { + +namespace numparse::impl { // Forward-declaration of implementation classes for friending class AffixPatternMatcherBuilder; @@ -44,8 +44,7 @@ class U_I18N_API CodePointMatcher : public NumberParseMatcher, public UMemory { UChar32 fCp; }; -} // namespace impl -} // namespace numparse +} // namespace numparse::impl // Export a explicit template instantiations of MaybeStackArray, MemoryPool and CompactUnicodeString. // When building DLLs for Windows this is required even though no direct access leaks out of the i18n library. @@ -58,8 +57,7 @@ template class U_I18N_API MemoryPool; template class U_I18N_API numparse::impl::CompactUnicodeString<4>; #endif -namespace numparse { -namespace impl { +namespace numparse::impl { struct AffixTokenMatcherSetupData { const CurrencySymbols& currencySymbols; @@ -221,9 +219,8 @@ class AffixMatcherWarehouse { parse_flags_t parseFlags, UErrorCode& status); }; +} // namespace numparse::impl -} // namespace impl -} // namespace numparse U_NAMESPACE_END #endif //__NUMPARSE_AFFIXES_H__ diff --git a/icu4c/source/i18n/numparse_compositions.h b/icu4c/source/i18n/numparse_compositions.h index f085912def1..b21941deec3 100644 --- a/icu4c/source/i18n/numparse_compositions.h +++ b/icu4c/source/i18n/numparse_compositions.h @@ -18,8 +18,7 @@ U_NAMESPACE_BEGIN template class U_I18N_API MaybeStackArray; #endif -namespace numparse { -namespace impl { +namespace numparse::impl { /** * Base class for AnyMatcher and SeriesMatcher. @@ -115,9 +114,8 @@ class U_I18N_API ArraySeriesMatcher : public SeriesMatcher { int32_t fMatchersLen; }; +} // namespace numparse::impl -} // namespace impl -} // namespace numparse U_NAMESPACE_END #endif //__SOURCE_NUMPARSE_COMPOSITIONS__ diff --git a/icu4c/source/i18n/numparse_currency.h b/icu4c/source/i18n/numparse_currency.h index 4e99334a31b..4d71d4fbc91 100644 --- a/icu4c/source/i18n/numparse_currency.h +++ b/icu4c/source/i18n/numparse_currency.h @@ -13,8 +13,8 @@ #include "number_currencysymbols.h" #include "unicode/uniset.h" -U_NAMESPACE_BEGIN namespace numparse { -namespace impl { +U_NAMESPACE_BEGIN +namespace numparse::impl { using ::icu::number::impl::CurrencySymbols; @@ -65,9 +65,7 @@ class U_I18N_API CombinedCurrencyMatcher : public NumberParseMatcher, public UMe bool matchCurrency(StringSegment& segment, ParsedNumber& result, UErrorCode& status) const; }; - -} // namespace impl -} // namespace numparse +} // namespace numparse::impl U_NAMESPACE_END #endif //__NUMPARSE_CURRENCY_H__ diff --git a/icu4c/source/i18n/numparse_decimal.h b/icu4c/source/i18n/numparse_decimal.h index 07c9afeccc9..b770749fa01 100644 --- a/icu4c/source/i18n/numparse_decimal.h +++ b/icu4c/source/i18n/numparse_decimal.h @@ -10,8 +10,8 @@ #include "unicode/uniset.h" #include "numparse_types.h" -U_NAMESPACE_BEGIN namespace numparse { -namespace impl { +U_NAMESPACE_BEGIN +namespace numparse::impl { using ::icu::number::impl::Grouper; @@ -67,9 +67,7 @@ class DecimalMatcher : public NumberParseMatcher, public UMemory { bool validateGroup(int32_t sepType, int32_t count, bool isPrimary) const; }; - -} // namespace impl -} // namespace numparse +} // namespace numparse::impl U_NAMESPACE_END #endif //__NUMPARSE_DECIMAL_H__ diff --git a/icu4c/source/i18n/numparse_impl.h b/icu4c/source/i18n/numparse_impl.h index 380d9aa4c64..4695a624d65 100644 --- a/icu4c/source/i18n/numparse_impl.h +++ b/icu4c/source/i18n/numparse_impl.h @@ -29,8 +29,7 @@ U_NAMESPACE_BEGIN template class U_I18N_API MaybeStackArray; #endif -namespace numparse { -namespace impl { +namespace numparse::impl { // Exported as U_I18N_API for tests class U_I18N_API NumberParserImpl : public MutableMatcherCollection, public UMemory { @@ -102,9 +101,8 @@ class U_I18N_API NumberParserImpl : public MutableMatcherCollection, public UMem StringSegment& segment, ParsedNumber& result, int32_t recursionLevels, UErrorCode& status) const; }; +} // namespace numparse::impl -} // namespace impl -} // namespace numparse U_NAMESPACE_END #endif //__NUMPARSE_IMPL_H__ diff --git a/icu4c/source/i18n/numparse_scientific.h b/icu4c/source/i18n/numparse_scientific.h index 5617c0c6a60..ed214b71711 100644 --- a/icu4c/source/i18n/numparse_scientific.h +++ b/icu4c/source/i18n/numparse_scientific.h @@ -14,9 +14,8 @@ using icu::number::impl::Grouper; -U_NAMESPACE_BEGIN namespace numparse { -namespace impl { - +U_NAMESPACE_BEGIN +namespace numparse::impl { class ScientificMatcher : public NumberParseMatcher, public UMemory { public: @@ -38,9 +37,7 @@ class ScientificMatcher : public NumberParseMatcher, public UMemory { UnicodeString fCustomPlusSign; }; - -} // namespace impl -} // namespace numparse +} // namespace numparse::impl U_NAMESPACE_END #endif //__NUMPARSE_SCIENTIFIC_H__ diff --git a/icu4c/source/i18n/numparse_symbols.h b/icu4c/source/i18n/numparse_symbols.h index beb133f7d07..3bc07b2be39 100644 --- a/icu4c/source/i18n/numparse_symbols.h +++ b/icu4c/source/i18n/numparse_symbols.h @@ -11,9 +11,8 @@ #include "unicode/uniset.h" #include "static_unicode_sets.h" -U_NAMESPACE_BEGIN namespace numparse { -namespace impl { - +U_NAMESPACE_BEGIN +namespace numparse::impl { /** * A base class for many matchers that performs a simple match against a UnicodeString and/or UnicodeSet. @@ -164,9 +163,7 @@ class U_I18N_API PlusSignMatcher : public SymbolMatcher { bool fAllowTrailing; }; - -} // namespace impl -} // namespace numparse +} // namespace numparse::impl U_NAMESPACE_END #endif //__NUMPARSE_SYMBOLS_H__ diff --git a/icu4c/source/i18n/numparse_types.h b/icu4c/source/i18n/numparse_types.h index 8e881793fd3..d5a53379be1 100644 --- a/icu4c/source/i18n/numparse_types.h +++ b/icu4c/source/i18n/numparse_types.h @@ -12,8 +12,7 @@ #include "string_segment.h" U_NAMESPACE_BEGIN -namespace numparse { -namespace impl { +namespace numparse::impl { // Forward-declarations class ParsedNumber; @@ -263,9 +262,7 @@ class U_I18N_API MutableMatcherCollection { virtual void addMatcher(NumberParseMatcher& matcher) = 0; }; - -} // namespace impl -} // namespace numparse +} // namespace numparse::impl U_NAMESPACE_END #endif //__NUMPARSE_TYPES_H__ diff --git a/icu4c/source/i18n/numparse_utils.h b/icu4c/source/i18n/numparse_utils.h index 8fda4f4369b..a842c6fae0c 100644 --- a/icu4c/source/i18n/numparse_utils.h +++ b/icu4c/source/i18n/numparse_utils.h @@ -10,10 +10,8 @@ #include "numparse_types.h" #include "unicode/uniset.h" -U_NAMESPACE_BEGIN namespace numparse { -namespace impl { -namespace utils { - +U_NAMESPACE_BEGIN +namespace numparse::impl::utils { inline static void putLeadCodePoints(const UnicodeSet* input, UnicodeSet* output) { for (int32_t i = 0; i < input->getRangeCount(); i++) { @@ -33,10 +31,7 @@ inline static void copyCurrencyCode(char16_t* dest, const char16_t* src) { dest[3] = 0; } - -} // namespace utils -} // namespace impl -} // namespace numparse +} // namespace numparse::impl::utils U_NAMESPACE_END #endif //__NUMPARSE_UTILS_H__ diff --git a/icu4c/source/i18n/numparse_validators.h b/icu4c/source/i18n/numparse_validators.h index 9bb4b482b55..3425bb07a79 100644 --- a/icu4c/source/i18n/numparse_validators.h +++ b/icu4c/source/i18n/numparse_validators.h @@ -10,9 +10,8 @@ #include "numparse_types.h" #include "static_unicode_sets.h" -U_NAMESPACE_BEGIN namespace numparse { -namespace impl { - +U_NAMESPACE_BEGIN +namespace numparse::impl { class ValidationMatcher : public NumberParseMatcher { public: @@ -86,9 +85,7 @@ class MultiplierParseHandler : public ValidationMatcher, public UMemory { ::icu::number::Scale fMultiplier; }; - -} // namespace impl -} // namespace numparse +} // namespace numparse::impl U_NAMESPACE_END #endif //__SOURCE_NUMPARSE_VALIDATORS_H__ diff --git a/icu4c/source/i18n/numrange_capi.cpp b/icu4c/source/i18n/numrange_capi.cpp index 9222969eb49..1432ea89ccd 100644 --- a/icu4c/source/i18n/numrange_capi.cpp +++ b/icu4c/source/i18n/numrange_capi.cpp @@ -24,8 +24,7 @@ using namespace icu::number::impl; U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { /** * Implementation class for UNumberRangeFormatter. Wraps a LocalizedRangeNumberFormatter. @@ -59,8 +58,7 @@ UFormattedNumberRangeImpl::~UFormattedNumberRangeImpl() { fImpl.fData = nullptr; } -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/icu4c/source/i18n/numrange_impl.h b/icu4c/source/i18n/numrange_impl.h index ac1d8a58972..cdee3d84ee7 100644 --- a/icu4c/source/i18n/numrange_impl.h +++ b/icu4c/source/i18n/numrange_impl.h @@ -17,9 +17,8 @@ #include "formattedval_impl.h" #include "pluralranges.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { - +U_NAMESPACE_BEGIN +namespace number::impl { /** * Class similar to UFormattedNumberData. @@ -80,9 +79,7 @@ class NumberRangeFormatterImpl : public UMemory { const UFormattedNumberRangeData* validateUFormattedNumberRange( const UFormattedNumberRange* uresult, UErrorCode& status); - -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__SOURCE_NUMRANGE_TYPES_H__ diff --git a/icu4c/source/i18n/pluralranges.h b/icu4c/source/i18n/pluralranges.h index eba59c70ed7..c06317850ae 100644 --- a/icu4c/source/i18n/pluralranges.h +++ b/icu4c/source/i18n/pluralranges.h @@ -17,11 +17,9 @@ U_NAMESPACE_BEGIN // Forward declarations -namespace number { -namespace impl { +namespace number::impl { class UFormattedNumberRangeData; } -} class StandardPluralRanges : public UMemory { public: diff --git a/icu4c/source/i18n/unicode/decimfmt.h b/icu4c/source/i18n/unicode/decimfmt.h index 713e4680959..1c55e367780 100644 --- a/icu4c/source/i18n/unicode/decimfmt.h +++ b/icu4c/source/i18n/unicode/decimfmt.h @@ -60,11 +60,9 @@ class UFormattedNumberData; } } -namespace numparse { -namespace impl { +namespace numparse::impl { class NumberParserImpl; } -} /** * **IMPORTANT:** New users are strongly encouraged to see if diff --git a/icu4c/source/i18n/unicode/fmtable.h b/icu4c/source/i18n/unicode/fmtable.h index 2efb1f758ab..d251d35ba88 100644 --- a/icu4c/source/i18n/unicode/fmtable.h +++ b/icu4c/source/i18n/unicode/fmtable.h @@ -35,11 +35,10 @@ U_NAMESPACE_BEGIN class CharString; -namespace number { -namespace impl { + +namespace number::impl { class DecimalQuantity; } -} /** * Formattable objects can be passed to the Format class or diff --git a/icu4c/source/i18n/unicode/measunit.h b/icu4c/source/i18n/unicode/measunit.h index 5dba69e6557..9ce9b1a65d0 100644 --- a/icu4c/source/i18n/unicode/measunit.h +++ b/icu4c/source/i18n/unicode/measunit.h @@ -33,11 +33,9 @@ U_NAMESPACE_BEGIN class StringEnumeration; class MeasureUnitImpl; -namespace number { -namespace impl { +namespace number::impl { class LongNameHandler; -} -} // namespace number +} // namespace number::impl /** * Enumeration for unit complexity. There are three levels: diff --git a/icu4c/source/i18n/unicode/numberformatter.h b/icu4c/source/i18n/unicode/numberformatter.h index b0566c2d92b..b02d987ce2b 100644 --- a/icu4c/source/i18n/unicode/numberformatter.h +++ b/icu4c/source/i18n/unicode/numberformatter.h @@ -93,15 +93,13 @@ class IFixedDecimal; class FieldPositionIteratorHandler; class FormattedStringBuilder; -namespace numparse { -namespace impl { +namespace numparse::impl { // Forward declarations: class NumberParserImpl; class MultiplierParseHandler; -} -} +} // namespace numparse::impl namespace units {