Std::complex<int8_t> warning with Blaze library in with Visual Studio 22 (VC143)

51 Views Asked by At

I have recently upgraded my IDE from Visual Studio 19 to Visual Studio 22. I've been using Blaze library (bitbucket.org/blaze-lib/blaze/src/master/) in my code before but now it seems I can't compile due to the below warning/error:

Error   C4996   'std::complex<int8_t>::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 suppress this warning. Blaze_test  R:...\BLAZE\v3.8\blaze\math\simd\BasicTypes.h   237

Even if I don't instantiate any std::complex<intXt> myself, the compiler will throw this warning/error, because blaze literally contains (even in the latest update of blaze 3.8.2):

/*!\class blaze::SIMDcint8
// \brief SIMD type for 8-bit signed integral complex values.
// \ingroup simd
*/
/*! \cond BLAZE_INTERNAL */
struct SIMDcint8
   : public SIMDci8< SIMDcint8 >
{
   using This      = SIMDcint8;
   using BaseType  = SIMDci8<This>;
   using ValueType = complex<int8_t>;

Minimum reproducible example:


#include <iostream>
#include <blaze/Math.h>

int main()
{
    // Testing blaze functionality
    blaze::DynamicMatrix<int> A( 2UL, 2UL, 0 );
    A(0,0) = 1;
    A(0,1) = 2;
    A(1,0) = 3;
    A(1,1) = 4;

    std::cout << "Blaze test\n";
}

Is there any way to resolve this and use Visual Studio 22 (VC143) with Blaze lib? Or just wait for blaze to push out an update and continue along with Visual Studio 19?

0

There are 0 best solutions below