From: Jeff Genovy <29107334+jefgen@users.noreply.github.com> Date: Thu, 26 Oct 2017 06:49:15 +0000 (+0000) Subject: ICU-13448 Feedback from clang expert was that these should not be specific to MSVC... X-Git-Tag: release-61-rc~198 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a799b3d3ff5ee68e62482f11ce22387d6311d2b2;p=icu ICU-13448 Feedback from clang expert was that these should not be specific to MSVC, but rather they should be specific to the Windows platform. X-SVN-Rev: 40643 --- diff --git a/icu4c/source/i18n/collationiterator.h b/icu4c/source/i18n/collationiterator.h index ff6e5ecea8e..12e05b4482f 100644 --- a/icu4c/source/i18n/collationiterator.h +++ b/icu4c/source/i18n/collationiterator.h @@ -34,12 +34,12 @@ class UVector32; // Export an explicit template instantiation of the MaybeStackArray that // is used as a data member of CEBuffer. // -// MSVC requires this, even though it should not be necessary. -// No direct access to the MaybeStackArray leaks out of the i18n library. +// When building DLLs for Windows this is required even though +// no direct access to the MaybeStackArray leaks out of the i18n library. // // See digitlst.h, pluralaffix.h, datefmt.h, and others for similar examples. // -#if defined (_MSC_VER) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN template class U_I18N_API MaybeStackArray; #endif diff --git a/icu4c/source/i18n/number_decimfmtprops.h b/icu4c/source/i18n/number_decimfmtprops.h index 3e25966b6f5..96356cad453 100644 --- a/icu4c/source/i18n/number_decimfmtprops.h +++ b/icu4c/source/i18n/number_decimfmtprops.h @@ -19,8 +19,8 @@ U_NAMESPACE_BEGIN // Export an explicit template instantiation of the LocalPointer that is used as a // data member of CurrencyPluralInfoWrapper. -// (MSVC requires this, even though it should not be necessary.) -#if defined (_MSC_VER) +// (When building DLLs for Windows this is required.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN // Ignore warning 4661 as LocalPointerBase does not use operator== or operator!= #pragma warning(suppress: 4661) template class U_I18N_API LocalPointerBase; diff --git a/icu4c/source/i18n/number_patternmodifier.h b/icu4c/source/i18n/number_patternmodifier.h index 705037f0ba7..3feaee04c8c 100644 --- a/icu4c/source/i18n/number_patternmodifier.h +++ b/icu4c/source/i18n/number_patternmodifier.h @@ -18,8 +18,8 @@ U_NAMESPACE_BEGIN // Export an explicit template instantiation of the LocalPointer that is used as a // data member of ParameterizedModifier. -// (MSVC requires this, even though it should not be necessary.) -#if defined (_MSC_VER) +// (When building DLLs for Windows this is required.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN // Ignore warning 4661 as LocalPointerBase does not use operator== or operator!= #pragma warning(suppress: 4661) template class U_I18N_API LocalPointerBase; diff --git a/icu4c/source/i18n/unicode/datefmt.h b/icu4c/source/i18n/unicode/datefmt.h index 3da0797a09b..f8bcf54bfb3 100644 --- a/icu4c/source/i18n/unicode/datefmt.h +++ b/icu4c/source/i18n/unicode/datefmt.h @@ -44,7 +44,8 @@ class TimeZone; class DateTimePatternGenerator; // explicit template instantiation. see digitlst.h -#if defined (_MSC_VER) +// (When building DLLs for Windows this is required.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN template class U_I18N_API EnumSet; diff --git a/icu4c/source/i18n/unicode/decimfmt.h b/icu4c/source/i18n/unicode/decimfmt.h index 790053636d5..2918ea1dd8a 100644 --- a/icu4c/source/i18n/unicode/decimfmt.h +++ b/icu4c/source/i18n/unicode/decimfmt.h @@ -67,7 +67,8 @@ class PluralRules; class VisibleDigitsWithExponent; // explicit template instantiation. see digitlst.h -#if defined (_MSC_VER) +// (When building DLLs for Windows this is required.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN template class U_I18N_API EnumSet;