diff --git a/icu4c/source/i18n/alphaindex.cpp b/icu4c/source/i18n/alphaindex.cpp index 1b02e050880..e94cdccdd2b 100644 --- a/icu4c/source/i18n/alphaindex.cpp +++ b/icu4c/source/i18n/alphaindex.cpp @@ -117,6 +117,11 @@ int32_t binarySearch(const UVector &list, const UnicodeString &s, const Collator } } +} // namespace + +// The BucketList is not in the anonymous namespace because only Clang +// seems to support its use in other classes from there. +// However, we also don't need U_I18N_API because it is not used from outside the i18n library. class BucketList : public UObject { public: BucketList(UVector *bucketList, UVector *publicBucketList) @@ -167,8 +172,6 @@ public: UVector *immutableVisibleList_; }; -} // namespace - AlphabeticIndex::ImmutableIndex::~ImmutableIndex() { delete buckets_; delete collatorPrimaryOnly_; diff --git a/icu4c/source/i18n/unicode/alphaindex.h b/icu4c/source/i18n/unicode/alphaindex.h index 1fb234e8982..64e2f5434ba 100644 --- a/icu4c/source/i18n/unicode/alphaindex.h +++ b/icu4c/source/i18n/unicode/alphaindex.h @@ -71,12 +71,7 @@ U_NAMESPACE_BEGIN // Forward Declarations -namespace { - class BucketList; - -} // namespace; - class Collator; class RuleBasedCollator; class StringEnumeration; diff --git a/icu4c/source/test/intltest/alphaindextst.cpp b/icu4c/source/test/intltest/alphaindextst.cpp index 8e70dcfa18c..9e7e75f123a 100644 --- a/icu4c/source/test/intltest/alphaindextst.cpp +++ b/icu4c/source/test/intltest/alphaindextst.cpp @@ -7,6 +7,8 @@ // file: alphaindex.cpp // Alphabetic Index Tests. // +#include // for sprintf + #include "intltest.h" #include "alphaindextst.h"