} // namespace utils
+#define DECNUM_INITIAL_CAPACITY 34
+
+ // Export an explicit template instantiation of the MaybeStackHeaderAndArray that is used as a data member of DecNum.
+ // When building DLLs for Windows this is required even though no direct access to the MaybeStackHeaderAndArray leaks out of the i18n library.
+ // (See digitlst.h, pluralaffix.h, datefmt.h, and others for similar examples.)
+#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
+template class U_I18N_API MaybeStackHeaderAndArray<decNumber, char, DECNUM_INITIAL_CAPACITY>;
+#endif
+
/** A very thin C++ wrapper around decNumber.h */
// Exported as U_I18N_API for tests
class U_I18N_API DecNum : public UMemory {
}
private:
- static constexpr int32_t kDefaultDigits = 34;
+ static constexpr int32_t kDefaultDigits = DECNUM_INITIAL_CAPACITY;
MaybeStackHeaderAndArray<decNumber, char, kDefaultDigits> fData;
decContext fContext;
};
+// Export an explicit template instantiation of the MaybeStackArray that is used as a data member of CodePointMatcherWarehouse.
+// When building DLLs for Windows this is required even though no direct access to the MaybeStackArray leaks out of the i18n library.
+// (See numparse_compositions.h, digitlst.h, pluralaffix.h, datefmt.h, and others for similar examples.)
+#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
+template class U_I18N_API MaybeStackArray<CodePointMatcher*, 3>;
+#endif
+
/**
* A warehouse to retain ownership of CodePointMatchers.
*/
void addMatcher(NumberParseMatcher& matcher) override;
};
+// Export an explicit template instantiation of the CompactUnicodeString that is used as a data member of AffixPatternMatcher.
+// When building DLLs for Windows this is required even though no direct access to the CompactUnicodeString leaks out of the i18n library.
+// (See digitlst.h, pluralaffix.h, datefmt.h, and others for similar examples.)
+#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
+template class U_I18N_API CompactUnicodeString<4>;
+#endif
// Exported as U_I18N_API for tests
class U_I18N_API AffixPatternMatcher : public ArraySeriesMatcher {
SeriesMatcher() = default;
};
+// Export an explicit template instantiation of the MaybeStackArray that is used as a data member of ArraySeriesMatcher.
+// 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 U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
+template class U_I18N_API MaybeStackArray<const NumberParseMatcher*, 3>;
+#endif
/**
* An implementation of SeriesMatcher that references an array of matchers.
U_NAMESPACE_BEGIN namespace numparse {
namespace impl {
+// Export an explicit template instantiation of the MaybeStackArray that is used as a data member of NumberParserImpl.
+// When building DLLs for Windows this is required even though no direct access to the MaybeStackArray leaks out of the i18n library.
+// (See numparse_compositions.h, numparse_affixes.h, datefmt.h, and others for similar examples.)
+#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
+template class U_I18N_API MaybeStackArray<const NumberParseMatcher*, 10>;
+#endif
+
// Exported as U_I18N_API for tests
class U_I18N_API NumberParserImpl : public MutableMatcherCollection {
public: