Closed QuellaZhang closed 1 year ago
Should be fixed now, but shouldn't you be getting the same error in hash_reference_values.cpp
, which also uses std::complex<int>
?
There are no more errors than the following errors.
hash_reference_values.cpp
libs\container_hash\test\hash_reference_values.cpp(340): error C2220: the following warning is treated as an error
libs\container_hash\test\hash_reference_values.cpp(340): warning C4996: 'std::complex<int>::complex': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to acknowledge that you have received this warning.
libs\container_hash\test\hash_reference_values.cpp(341): warning C4996: 'std::complex<int>::complex': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to acknowledge that you have received this warning.
libs\container_hash\test\hash_reference_values.cpp(342): warning C4996: 'std::complex<int>::complex': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to acknowledge that you have received this warning.
libs\container_hash\test\hash_reference_values.cpp(351): warning C4996: 'std::complex<int>::complex': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to acknowledge that you have received this warning.
libs\container_hash\test\hash_reference_values.cpp(352): warning C4996: 'std::complex<int>::complex': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to acknowledge that you have received this warning.
This should be fixed now as well.
Issue description: Boost\libs\container_hash failed to build due to warning C4996 on MSVC, regress by https://github.com/microsoft/STL/pull/2759. Could you please take a look?
Build step:
Error info: hash_complex_test.cpp libs\container_hash\test\hash_complex_test.cpp(83): error C2220: the following warning is treated as an error libs\container_hash\test\hash_complex_test.cpp(83): warning C4996: 'std::complex::complex': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to acknowledge that you have received this warning.
with
[
Integer=int
]
libs\container_hash\test\hash_complex_test.cpp(101): note: see reference to function template instantiation 'void complex_integral_tests(Integer )' being compiled
with
[
Integer=int
]
libs\container_hash\test\hash_complex_test.cpp(84): warning C4996: 'std::complex::complex': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to acknowledge that you have received this warning.
with
[
Integer=int
]
libs\container_hash\test\hash_complex_test.cpp(85): warning C4996: 'std::complex::complex': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to acknowledge that you have received this warning.
with
[
Integer=int
]
libs\container_hash\test\hash_complex_test.cpp(86): warning C4996: 'std::complex::complex': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to acknowledge that you have received this warning.
with
[
Integer=int
]
libs\container_hash\test\hash_complex_test.cpp(87): warning C4996: 'std::complex::complex': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to acknowledge that you have received this warning.
with
[
Integer=int
]
libs\container_hash\test\hash_complex_test.cpp(88): warning C4996: 'std::complex::complex': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to acknowledge that you have received this warning.
with
[
Integer=int
]
libs\container_hash\test\hash_complex_test.cpp(83): warning C4996: 'std::complex::complex': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to acknowledge that you have received this warning.
with
[
Integer=long
]
libs\container_hash\test\hash_complex_test.cpp(102): note: see reference to function template instantiation 'void complex_integral_tests(Integer )' being compiled
with
[
Integer=long