mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
Disable warning 4661 for MSVC for NumberFormatterSettings and [Un]localizedNumberFormatter.
This commit is contained in:
parent
45aa7316ce
commit
eb75e6050e
3 changed files with 43 additions and 0 deletions
|
@ -20,6 +20,16 @@ using namespace icu;
|
|||
using namespace icu::number;
|
||||
using namespace icu::number::impl;
|
||||
|
||||
#if (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(_MSC_VER)
|
||||
// Ignore MSVC warning 4661. This is generated for NumberFormatterSettings<>::toSkeleton() as this method
|
||||
// is defined elsewhere (in number_skeletons.cpp). The compiler is warning that the explicit template instantiation
|
||||
// inside this single translation unit (CPP file) is incomplete, and thus it isn't sure if the template class is
|
||||
// fully defined. However, since each translation unit explicitly instantiates all the necessary template classes,
|
||||
// they will all be passed to the linker, and the linker will still find and export all the class members.
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4661)
|
||||
#endif
|
||||
|
||||
template<typename Derived>
|
||||
Derived NumberFormatterSettings<Derived>::notation(const Notation& notation) const& {
|
||||
Derived copy(*this);
|
||||
|
@ -750,5 +760,9 @@ int32_t LocalizedNumberFormatter::getCallCount() const {
|
|||
|
||||
// Note: toFormat defined in number_asformat.cpp
|
||||
|
||||
#if (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(_MSC_VER)
|
||||
// Warning 4661.
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -30,6 +30,16 @@ using namespace icu::number;
|
|||
using namespace icu::number::impl;
|
||||
using namespace icu::number::impl::skeleton;
|
||||
|
||||
#if (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(_MSC_VER)
|
||||
// Ignore MSVC warning 4661. This is generated for NumberFormatterSettings<>::toSkeleton() as this method
|
||||
// is defined elsewhere (in number_skeletons.cpp). The compiler is warning that the explicit template instantiation
|
||||
// inside this single translation unit (CPP file) is incomplete, and thus it isn't sure if the template class is
|
||||
// fully defined. However, since each translation unit explicitly instantiates all the necessary template classes,
|
||||
// they will all be passed to the linker, and the linker will still find and export all the class members.
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4661)
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
icu::UInitOnce gNumberSkeletonsInitOnce = U_INITONCE_INITIALIZER;
|
||||
|
@ -1717,5 +1727,9 @@ NumberFormatter::forSkeleton(const UnicodeString& skeleton, UParseError& perror,
|
|||
return skeleton::create(skeleton, &perror, status);
|
||||
}
|
||||
|
||||
#if (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(_MSC_VER)
|
||||
// Warning 4661.
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -1439,6 +1439,16 @@ struct U_I18N_API MacroProps : public UMemory {
|
|||
|
||||
} // namespace impl
|
||||
|
||||
#if (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(_MSC_VER)
|
||||
// Ignore MSVC warning 4661. This is generated for NumberFormatterSettings<>::toSkeleton() as this method
|
||||
// is defined elsewhere (in number_skeletons.cpp). The compiler is warning that the explicit template instantiation
|
||||
// inside this single translation unit (CPP file) is incomplete, and thus it isn't sure if the template class is
|
||||
// fully defined. However, since each translation unit explicitly instantiates all the necessary template classes,
|
||||
// they will all be passed to the linker, and the linker will still find and export all the class members.
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4661)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* An abstract base class for specifying settings related to number formatting. This class is implemented by
|
||||
* {@link UnlocalizedNumberFormatter} and {@link LocalizedNumberFormatter}. This class is not intended for
|
||||
|
@ -2405,6 +2415,11 @@ class U_I18N_API LocalizedNumberFormatter
|
|||
friend class UnlocalizedNumberFormatter;
|
||||
};
|
||||
|
||||
#if (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(_MSC_VER)
|
||||
// Warning 4661.
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The result of a number formatting operation. This class allows the result to be exported in several data types,
|
||||
* including a UnicodeString and a FieldPositionIterator.
|
||||
|
|
Loading…
Add table
Reference in a new issue