ICU-22222 Add explicit instantiation declarations

We exclude these declarations from MSVC, where they don't work because
the don't interact well with the U_I18N_API import/export macros
This commit is contained in:
Thomas Köppe 2022-12-02 01:49:06 +00:00 committed by Markus Scherer
parent dcac8ac4c1
commit 0c6d7fc98d
2 changed files with 14 additions and 0 deletions

View file

@ -2418,6 +2418,13 @@ class U_I18N_API NumberFormatterSettings {
friend class impl::NumberRangeFormatterImpl;
};
// Explicit instantiations in source/i18n/number_fluent.cpp.
// (MSVC treats imports/exports of explicit instantiations differently.)
#ifndef _MSC_VER
extern template class NumberFormatterSettings<UnlocalizedNumberFormatter>;
extern template class NumberFormatterSettings<LocalizedNumberFormatter>;
#endif
/**
* A NumberFormatter that does not yet have a locale. In order to format numbers, a locale must be specified.
*

View file

@ -381,6 +381,13 @@ class U_I18N_API NumberRangeFormatterSettings {
friend class UnlocalizedNumberRangeFormatter;
};
// Explicit instantiations in source/i18n/numrange_fluent.cpp.
// (MSVC treats imports/exports of explicit instantiations differently.)
#ifndef _MSC_VER
extern template class NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>;
extern template class NumberRangeFormatterSettings<LocalizedNumberRangeFormatter>;
#endif
/**
* A NumberRangeFormatter that does not yet have a locale. In order to format, a locale must be specified.
*