diff --git a/icu4c/source/i18n/number_fluent.cpp b/icu4c/source/i18n/number_fluent.cpp index 198c7caee0f..e0e489a3573 100644 --- a/icu4c/source/i18n/number_fluent.cpp +++ b/icu4c/source/i18n/number_fluent.cpp @@ -363,6 +363,7 @@ UnlocalizedNumberFormatter::UnlocalizedNumberFormatter(const NFS& other) // No additional fields to assign } +// Make default copy constructor call the NumberFormatterSettings copy constructor. UnlocalizedNumberFormatter::UnlocalizedNumberFormatter(UNF&& src) U_NOEXCEPT : UNF(static_cast&&>(src)) {} @@ -383,6 +384,7 @@ UnlocalizedNumberFormatter& UnlocalizedNumberFormatter::operator=(UNF&& src) U_N return *this; } +// Make default copy constructor call the NumberFormatterSettings copy constructor. LocalizedNumberFormatter::LocalizedNumberFormatter(const LNF& other) : LNF(static_cast&>(other)) {} diff --git a/icu4c/source/i18n/numrange_fluent.cpp b/icu4c/source/i18n/numrange_fluent.cpp index ec00588502e..aee9518fe09 100644 --- a/icu4c/source/i18n/numrange_fluent.cpp +++ b/icu4c/source/i18n/numrange_fluent.cpp @@ -3,7 +3,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT +#if !UCONFIG_NO_FORMATTING // Allow implicit conversion from char16_t* to UnicodeString for this file: // Helpful in toString methods and elsewhere. @@ -192,6 +192,7 @@ UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(const NFS& // No additional fields to assign } +// Make default copy constructor call the NumberRangeFormatterSettings copy constructor. UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(UNF&& src) U_NOEXCEPT : UNF(static_cast&&>(src)) {} @@ -212,6 +213,7 @@ UnlocalizedNumberRangeFormatter& UnlocalizedNumberRangeFormatter::operator=(UNF& return *this; } +// Make default copy constructor call the NumberRangeFormatterSettings copy constructor. LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter(const LNF& other) : LNF(static_cast&>(other)) {} diff --git a/icu4c/source/i18n/numrange_impl.cpp b/icu4c/source/i18n/numrange_impl.cpp index 140effaaa64..b240c3140d6 100644 --- a/icu4c/source/i18n/numrange_impl.cpp +++ b/icu4c/source/i18n/numrange_impl.cpp @@ -3,7 +3,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT +#if !UCONFIG_NO_FORMATTING // Allow implicit conversion from char16_t* to UnicodeString for this file: // Helpful in toString methods and elsewhere. @@ -181,6 +181,7 @@ NumberRangeFormatterImpl::NumberRangeFormatterImpl(const RangeMacroProps& macros // this part of the code should be updated to load from the local numbering system. // The numbering system could come from the one specified in the NumberFormatter passed to // numberFormatterBoth() or similar. + // See ICU-20144 NumberRangeData data; getNumberRangeData(macros.locale.getName(), "latn", data, status); diff --git a/icu4c/source/i18n/numrange_impl.h b/icu4c/source/i18n/numrange_impl.h index c763f0c72c5..787fc656860 100644 --- a/icu4c/source/i18n/numrange_impl.h +++ b/icu4c/source/i18n/numrange_impl.h @@ -20,13 +20,10 @@ namespace impl { /** - * Implementation class for UFormattedNumber with magic number for safety. + * Class similar to UFormattedNumberData. * - * This struct is also held internally by the C++ version FormattedNumber since the member types are not - * declared in the public header file. - * - * The DecimalQuantity is not currently being used by FormattedNumber, but at some point it could be used - * to add a toDecNumber() or similar method. + * Has incomplete magic number logic that will need to be finished + * if this is to be exposed as C API in the future. */ struct UFormattedNumberRangeData : public UMemory { // The magic number to identify incoming objects. diff --git a/icu4c/source/i18n/unicode/numberformatter.h b/icu4c/source/i18n/unicode/numberformatter.h index b742e9104f1..b75d8e6432f 100644 --- a/icu4c/source/i18n/unicode/numberformatter.h +++ b/icu4c/source/i18n/unicode/numberformatter.h @@ -2157,7 +2157,6 @@ class U_I18N_API UnlocalizedNumberFormatter */ UnlocalizedNumberFormatter() = default; - // Make default copy constructor call the NumberFormatterSettings copy constructor. /** * Returns a copy of this UnlocalizedNumberFormatter. * @draft ICU 60 @@ -2296,7 +2295,6 @@ class U_I18N_API LocalizedNumberFormatter */ LocalizedNumberFormatter() = default; - // Make default copy constructor call the NumberFormatterSettings copy constructor. /** * Returns a copy of this LocalizedNumberFormatter. * @draft ICU 60 diff --git a/icu4c/source/i18n/unicode/numberrangeformatter.h b/icu4c/source/i18n/unicode/numberrangeformatter.h index 30a7c1e8050..5b9f264f9bf 100644 --- a/icu4c/source/i18n/unicode/numberrangeformatter.h +++ b/icu4c/source/i18n/unicode/numberrangeformatter.h @@ -493,7 +493,6 @@ class U_I18N_API UnlocalizedNumberRangeFormatter */ UnlocalizedNumberRangeFormatter() = default; - // Make default copy constructor call the NumberFormatterSettings copy constructor. /** * Returns a copy of this UnlocalizedNumberRangeFormatter. * @draft ICU 63 @@ -566,7 +565,6 @@ class U_I18N_API LocalizedNumberRangeFormatter */ LocalizedNumberRangeFormatter() = default; - // Make default copy constructor call the NumberRangeFormatterSettings copy constructor. /** * Returns a copy of this LocalizedNumberRangeFormatter. * @draft ICU 63 diff --git a/icu4j/main/classes/core/src/com/ibm/icu/number/NumberRangeFormatterImpl.java b/icu4j/main/classes/core/src/com/ibm/icu/number/NumberRangeFormatterImpl.java index 1a43f85f36e..cdccb5e6df6 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/number/NumberRangeFormatterImpl.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/number/NumberRangeFormatterImpl.java @@ -120,6 +120,7 @@ class NumberRangeFormatterImpl { // this part of the code should be updated to load from the local numbering system. // The numbering system could come from the one specified in the NumberFormatter passed to // numberFormatterBoth() or similar. + // See ICU-20144 getNumberRangeData(macros.loc, "latn", this);