# define U_FALLTHROUGH
#endif
-/**
-* \def UPRV_SUPPRESS_DLL_INTERFACE_WARNING
-* Add a pragma for suppressing warning 4251:
-* "class X needs to have dll-interface to be used by clients of class Y"
-* This warning is noisy when private member fields are at play.
-* Macro is empty except on Visual C++.
-* @internal
-*/
-#if defined(_MSC_VER)
-# define UPRV_SUPPRESS_DLL_INTERFACE_WARNING __pragma(warning(suppress: 4251))
-#else
-# define UPRV_SUPPRESS_DLL_INTERFACE_WARNING
-#endif
-
/** @} */
/*===========================================================================*/
// data member of CurrencyPluralInfoWrapper.
// (MSVC requires this, even though it should not be necessary.)
#if defined (_MSC_VER)
+// Ignore warning 4661 as LocalPointerBase does not use operator== or operator!=
+#pragma warning(suppress: 4661)
+template class U_I18N_API LocalPointerBase<CurrencyPluralInfo>;
template class U_I18N_API LocalPointer<CurrencyPluralInfo>;
#endif
// Forward declaration
class MutablePatternModifier;
-
+
+// 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)
+// Ignore warning 4661 as LocalPointerBase does not use operator== or operator!=
+#pragma warning(suppress: 4661)
+template class U_I18N_API LocalPointerBase<ParameterizedModifier>;
+template class U_I18N_API LocalPointer<ParameterizedModifier>;
+#endif
+
// Exported as U_I18N_API because it is needed for the unit test PatternModifierTest
class U_I18N_API ImmutablePatternModifier : public MicroPropsGenerator {
public:
private:
ImmutablePatternModifier(ParameterizedModifier *pm, const PluralRules *rules, const MicroPropsGenerator *parent);
- UPRV_SUPPRESS_DLL_INTERFACE_WARNING // Member is private and does not need to be exported
const LocalPointer<ParameterizedModifier> pm;
const PluralRules *rules;
const MicroPropsGenerator *parent;
bool containsSymbolType(AffixPatternType type, UErrorCode &status) const U_OVERRIDE;
private:
- struct ParserState {
+ struct U_I18N_API ParserState {
const UnicodeString &pattern; // reference to the parent
int32_t offset = 0;
// This method is here as a shell for Java compatibility.
inline void toParseException(const char16_t *message) { (void)message; }
}
- UPRV_SUPPRESS_DLL_INTERFACE_WARNING // Member is private and does not need to be exported
state;
// NOTE: In Java, these are written as pure functions.