From 9452d9ed08be146d10d92e927be8d952463a1ff7 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Wed, 20 Feb 2013 20:57:54 +0000 Subject: [PATCH] ICU-9880 g++ does not seem to allow a class pointer field whose type is from an anonymous namespace X-SVN-Rev: 33277 --- icu4c/source/i18n/alphaindex.cpp | 7 +++++-- icu4c/source/i18n/unicode/alphaindex.h | 5 ----- icu4c/source/test/intltest/alphaindextst.cpp | 2 ++ 3 files changed, 7 insertions(+), 7 deletions(-) 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"