diff --git a/icu4c/source/common/unicode/bytestrie.h b/icu4c/source/common/unicode/bytestrie.h
index 8d5420f3fbc..51405f64a10 100644
--- a/icu4c/source/common/unicode/bytestrie.h
+++ b/icu4c/source/common/unicode/bytestrie.h
@@ -97,6 +97,7 @@ public:
return *this;
}
+#ifndef U_HIDE_DRAFT_API
/**
* Returns the state of this trie as a 64-bit integer.
* The state value is never 0.
@@ -129,6 +130,7 @@ public:
pos_ = bytes_ + (state & kState64PosMask);
return *this;
}
+#endif /* U_HIDE_DRAFT_API */
/**
* BytesTrie state object, for saving a trie's current state
diff --git a/icu4c/source/common/unicode/localebuilder.h b/icu4c/source/common/unicode/localebuilder.h
index 6805ab1a4d1..19e10f1c070 100644
--- a/icu4c/source/common/unicode/localebuilder.h
+++ b/icu4c/source/common/unicode/localebuilder.h
@@ -279,6 +279,7 @@ public:
*/
Locale build(UErrorCode& status);
+#ifndef U_HIDE_DRAFT_API
/**
* Sets the UErrorCode if an error occurred while recording sets.
* Preserves older error codes in the outErrorCode.
@@ -289,6 +290,7 @@ public:
* @draft ICU 65
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const;
+#endif /* U_HIDE_DRAFT_API */
private:
friend class LocaleMatcher::Result;
diff --git a/icu4c/source/common/unicode/ucharstrie.h b/icu4c/source/common/unicode/ucharstrie.h
index 8bc914e24d6..d5729d944ee 100644
--- a/icu4c/source/common/unicode/ucharstrie.h
+++ b/icu4c/source/common/unicode/ucharstrie.h
@@ -97,6 +97,7 @@ public:
return *this;
}
+#ifndef U_HIDE_DRAFT_API
/**
* Returns the state of this trie as a 64-bit integer.
* The state value is never 0.
@@ -129,6 +130,7 @@ public:
pos_ = uchars_ + (state & kState64PosMask);
return *this;
}
+#endif /* U_HIDE_DRAFT_API */
/**
* UCharsTrie state object, for saving a trie's current state
diff --git a/icu4c/source/common/unicode/uniset.h b/icu4c/source/common/unicode/uniset.h
index c8525ad2c0b..97423110035 100644
--- a/icu4c/source/common/unicode/uniset.h
+++ b/icu4c/source/common/unicode/uniset.h
@@ -1655,11 +1655,10 @@ private:
const UnicodeSet* inclusions,
UErrorCode &status);
-#ifndef U_HIDE_DRAFT_API // Skipped: ucpmap.h is draft only.
+ // UCPMap is now stable ICU 63
void applyIntPropertyValue(const UCPMap *map,
UCPMapValueFilter *filter, const void *context,
UErrorCode &errorCode);
-#endif /* U_HIDE_DRAFT_API */
/**
* Set the new pattern to cache.
diff --git a/icu4c/source/i18n/unicode/calendar.h b/icu4c/source/i18n/unicode/calendar.h
index 6d9d1e40289..47167114ab3 100644
--- a/icu4c/source/i18n/unicode/calendar.h
+++ b/icu4c/source/i18n/unicode/calendar.h
@@ -2283,7 +2283,6 @@ private:
* should only be called if this calendar is not lenient.
* @see #isLenient
* @see #validateField(int, int&)
- * @internal
*/
void validateFields(UErrorCode &status);
@@ -2293,7 +2292,6 @@ private:
* U_ILLEGAL_ARGUMENT_ERROR
will be set. Subclasses may
* use this method in their implementation of {@link
* #validateField(int, int&)}.
- * @internal
*/
void validateField(UCalendarDateFields field, int32_t min, int32_t max, UErrorCode& status);
diff --git a/icu4c/source/i18n/unicode/dcfmtsym.h b/icu4c/source/i18n/unicode/dcfmtsym.h
index 28ebbe58bf0..e1e0ab6b08c 100644
--- a/icu4c/source/i18n/unicode/dcfmtsym.h
+++ b/icu4c/source/i18n/unicode/dcfmtsym.h
@@ -457,13 +457,11 @@ private:
* to non-resource bundle strings,
* then regular UnicodeString copies must be used instead of fastCopyFrom().
*
- * @internal
*/
UnicodeString fSymbols[kFormatSymbolCount];
/**
* Non-symbol variable for getConstSymbol(). Always empty.
- * @internal
*/
UnicodeString fNoSymbol;
diff --git a/icu4c/source/i18n/unicode/dtptngen.h b/icu4c/source/i18n/unicode/dtptngen.h
index 6cb13878862..a71938b31cf 100644
--- a/icu4c/source/i18n/unicode/dtptngen.h
+++ b/icu4c/source/i18n/unicode/dtptngen.h
@@ -565,12 +565,10 @@ private:
void setDateTimeFromCalendar(const Locale& locale, UErrorCode& status);
void setDecimalSymbols(const Locale& locale, UErrorCode& status);
UDateTimePatternField getAppendFormatNumber(const char* field) const;
-#ifndef U_HIDE_DRAFT_API
- // The following three have to be U_HIDE_DRAFT_API (though private) because UDateTimePGDisplayWidth is
+ // Note for the next 3: UDateTimePGDisplayWidth is now stable ICU 61
UDateTimePatternField getFieldAndWidthIndices(const char* key, UDateTimePGDisplayWidth* widthP) const;
void setFieldDisplayName(UDateTimePatternField field, UDateTimePGDisplayWidth width, const UnicodeString& value);
UnicodeString& getMutableFieldDisplayName(UDateTimePatternField field, UDateTimePGDisplayWidth width);
-#endif // U_HIDE_DRAFT_API
void getAppendName(UDateTimePatternField field, UnicodeString& value);
UnicodeString mapSkeletonMetacharacters(const UnicodeString& patternForm, int32_t* flags, UErrorCode& status);
const UnicodeString* getBestRaw(DateTimeMatcher& source, int32_t includeMask, DistanceInfo* missingFields, UErrorCode& status, const PtnSkeleton** specifiedSkeletonPtr = 0);
diff --git a/icu4c/source/i18n/unicode/formattedvalue.h b/icu4c/source/i18n/unicode/formattedvalue.h
index faf93a20dff..61fdb8ec6af 100644
--- a/icu4c/source/i18n/unicode/formattedvalue.h
+++ b/icu4c/source/i18n/unicode/formattedvalue.h
@@ -26,7 +26,9 @@ U_NAMESPACE_BEGIN
*/
-#ifndef U_HIDE_DRAFT_API
+// The following cannot have #ifndef U_HIDE_DRAFT_API because
+// class FormattedValue depends on it, and FormattedValue cannot be
+// hidden becauseclass FormattedNumber (stable ICU 60) depends on it.
/**
* Represents a span of a string containing a given field.
*
@@ -55,6 +57,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
/** @draft ICU 64 */
~ConstrainedFieldPosition();
+#ifndef U_HIDE_DRAFT_API
/**
* Resets this ConstrainedFieldPosition to its initial state, as if it were newly created:
*
@@ -224,18 +227,23 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
int32_t field,
int32_t start,
int32_t limit);
+#endif /* U_HIDE_DRAFT_API */
private:
int64_t fContext = 0LL;
int32_t fField = 0;
int32_t fStart = 0;
int32_t fLimit = 0;
+#ifndef U_HIDE_DRAFT_API
int32_t fCategory = UFIELD_CATEGORY_UNDEFINED;
+#else /* U_HIDE_DRAFT_API */
+ int32_t fCategory = 0;
+#endif /* U_HIDE_DRAFT_API */
int8_t fConstraint = 0;
};
-#endif // U_HIDE_DRAFT_API
-
+// The following cannot have #ifndef U_HIDE_DRAFT_API because
+// class FormattedNumber (stable ICU 60) depends on it.
/**
* An abstract formatted value: a string with associated field attributes.
* Many formatters format to classes implementing FormattedValue.
@@ -288,7 +296,6 @@ class U_I18N_API FormattedValue /* not : public UObject because this is an inter
*/
virtual Appendable& appendTo(Appendable& appendable, UErrorCode& status) const = 0;
-#ifndef U_HIDE_DRAFT_API
/**
* Iterates over field positions in the FormattedValue. This lets you determine the position
* of specific types of substrings, like a month or a decimal separator.
@@ -312,7 +319,6 @@ class U_I18N_API FormattedValue /* not : public UObject because this is an inter
* @draft ICU 64
*/
virtual UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const = 0;
-#endif
};
diff --git a/icu4c/source/i18n/unicode/numberformatter.h b/icu4c/source/i18n/unicode/numberformatter.h
index 7049764ba34..82d2e3c596e 100644
--- a/icu4c/source/i18n/unicode/numberformatter.h
+++ b/icu4c/source/i18n/unicode/numberformatter.h
@@ -2410,14 +2410,14 @@ class U_I18N_API LocalizedNumberFormatter
class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
public:
-#ifndef U_HIDE_DRAFT_API
+ // Default constructor cannot have #ifndef U_HIDE_DRAFT_API
/**
* Default constructor; makes an empty FormattedNumber.
* @draft ICU 64
*/
FormattedNumber()
: fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
-#endif
+
/**
* Move constructor: Leaves the source FormattedNumber in an undefined state.
* @stable ICU 62
@@ -2466,11 +2466,11 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
*/
Appendable &appendTo(Appendable& appendable, UErrorCode& status) const U_OVERRIDE;
-#ifndef U_HIDE_DRAFT_API
// Copydoc: this method is new in ICU 64
/** @copydoc FormattedValue::nextPosition() */
UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
+#ifndef U_HIDE_DRAFT_API
/**
* Determines the start (inclusive) and end (exclusive) indices of the next occurrence of the given
* field in the output string. This allows you to determine the locations of, for example,
@@ -2522,7 +2522,9 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
* @see UNumberFormatFields
*/
void getAllFieldPositions(FieldPositionIterator &iterator, UErrorCode &status) const;
+#endif /* U_HIDE_DRAFT_API */
+#ifndef U_HIDE_DRAFT_API
/**
* Export the formatted number as a "numeric string" conforming to the
* syntax defined in the Decimal Arithmetic Specification, available at
diff --git a/icu4c/source/i18n/unicode/numberrangeformatter.h b/icu4c/source/i18n/unicode/numberrangeformatter.h
index b8f3ff55beb..0f0d2af5f5b 100644
--- a/icu4c/source/i18n/unicode/numberrangeformatter.h
+++ b/icu4c/source/i18n/unicode/numberrangeformatter.h
@@ -449,6 +449,7 @@ class U_I18N_API NumberRangeFormatterSettings {
*/
Derived identityFallback(UNumberRangeIdentityFallback identityFallback) &&;
+#ifndef U_HIDE_DRAFT_API
/**
* Returns the current (Un)LocalizedNumberRangeFormatter as a LocalPointer
* wrapping a heap-allocated copy of the current object.
@@ -470,6 +471,7 @@ class U_I18N_API NumberRangeFormatterSettings {
* @draft ICU 64
*/
LocalPointer clone() &&;
+#endif /* U_HIDE_DRAFT_API */
/**
* Sets the UErrorCode if an error occurred in the fluent chain.
@@ -654,7 +656,7 @@ class U_I18N_API LocalizedNumberRangeFormatter
void formatImpl(impl::UFormattedNumberRangeData& results, bool equalBeforeRounding,
UErrorCode& status) const;
-#endif
+#endif /* U_HIDE_INTERNAL_API */
/**
* Destruct this LocalizedNumberRangeFormatter, cleaning up any memory it might own.
@@ -721,11 +723,11 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
*/
Appendable &appendTo(Appendable &appendable, UErrorCode& status) const U_OVERRIDE;
-#ifndef U_HIDE_DRAFT_API
// Copydoc: this method is new in ICU 64
/** @copydoc FormattedValue::nextPosition() */
UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
+#ifndef U_HIDE_DRAFT_API
/**
* Determines the start (inclusive) and end (exclusive) indices of the next occurrence of the given
* field in the output string. This allows you to determine the locations of, for example,
@@ -855,7 +857,6 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
/**
* Internal constructor from data type. Adopts the data pointer.
- * @internal
*/
explicit FormattedNumberRange(impl::UFormattedNumberRangeData *results)
: fData(results), fErrorCode(U_ZERO_ERROR) {}
diff --git a/icu4c/source/i18n/unicode/plurfmt.h b/icu4c/source/i18n/unicode/plurfmt.h
index fb9a43344c0..2c2116586f6 100644
--- a/icu4c/source/i18n/unicode/plurfmt.h
+++ b/icu4c/source/i18n/unicode/plurfmt.h
@@ -524,7 +524,7 @@ public:
private:
/**
- * @internal
+ * @internal (private)
*/
class U_I18N_API PluralSelector : public UMemory {
public:
@@ -536,14 +536,11 @@ private:
* @param number The number to be plural-formatted.
* @param ec Error code.
* @return The selected PluralFormat keyword.
- * @internal
+ * @internal (private)
*/
virtual UnicodeString select(void *context, double number, UErrorCode& ec) const = 0;
};
- /**
- * @internal
- */
class U_I18N_API PluralSelectorAdapter : public PluralSelector {
public:
PluralSelectorAdapter() : pluralRules(NULL) {
@@ -551,7 +548,7 @@ private:
virtual ~PluralSelectorAdapter();
- virtual UnicodeString select(void *context, double number, UErrorCode& /*ec*/) const; /**< @internal */
+ virtual UnicodeString select(void *context, double number, UErrorCode& /*ec*/) const;
void reset();
@@ -575,7 +572,7 @@ private:
UnicodeString& format(const Formattable& numberObject, double number,
UnicodeString& appendTo,
FieldPosition& pos,
- UErrorCode& status) const; /**< @internal */
+ UErrorCode& status) const;
/**
* Finds the PluralFormat sub-message for the given number, or the "other" sub-message.
diff --git a/icu4c/source/i18n/unicode/ulistformatter.h b/icu4c/source/i18n/unicode/ulistformatter.h
index e3903051501..1a390088898 100644
--- a/icu4c/source/i18n/unicode/ulistformatter.h
+++ b/icu4c/source/i18n/unicode/ulistformatter.h
@@ -41,7 +41,9 @@ struct UFormattedList;
* @draft ICU 64
*/
typedef struct UFormattedList UFormattedList;
+#endif /* U_HIDE_DRAFT_API */
+#ifndef U_HIDE_DRAFT_API
/**
* FieldPosition and UFieldPosition selectors for format fields
* defined by ListFormatter.