std::complex<int> is unspecified C++
From 26.4.2 of C++ standard:
The effect of instantiating the template complex for any type other than float, double, or long double is unspecified.
But OTB uses std::complex<int>
, std::complex<short>
and std::complex<unsigned short>
in multiple places, which is not valid C++:
$ ag -o "std::complex<([a-z\s])+>" | ag -v "(double|float|long double)" | ag -v "std::complex<[A-Z].*>"
Modules/IO/ImageIO/test/otbImageFileReaderRADComplexInt.cxx:35:std::complex<int>
Modules/IO/ImageIO/test/otbImageFileReaderRADComplexInt.cxx:36:std::complex<int>
Modules/IO/ImageIO/include/otbImageFileReader.txx:813:std::complex<int>
Modules/IO/ImageIO/include/otbImageFileReader.txx:814:std::complex<short>
Modules/IO/ImageIO/include/otbImageFileReader.txx:869:std::complex<short>
Modules/IO/ImageIO/include/otbImageFileReader.txx:870:std::complex<int>
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx:605:std::complex<short>
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx:609:std::complex<int>
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx:614:std::complex<short>
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx:616:std::complex<int>
Modules/Feature/Descriptors/include/otbForwardFourierMellinTransformImageFilter.h:63:std::complex< TPixel >
Modules/Wrappers/ApplicationEngine/include/otbWrapperTypes.h:129:std::complex<short>
Modules/Wrappers/ApplicationEngine/include/otbWrapperTypes.h:130:std::complex<int>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:213:std::complex<short>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:215:std::complex<int>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:440:std::complex<short>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:447:std::complex<int>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:488:std::complex<short>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:489:std::complex<int>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:697:std::complex<short>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:699:std::complex<int>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:913:std::complex<short>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:921:std::complex<int>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:1041:std::complex<short>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:1041:std::complex<short>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:1048:std::complex<int>
Modules/Core/ImageBase/src/otbImageIOBase.cxx:1048:std::complex<int>
Modules/Core/ObjectList/test/otbObjectListToObjectListFilterNew.cxx:29:std::complex<int>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:361:std::complex<unsigned short>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:362:std::complex<unsigned short>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:363:std::complex<unsigned short>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:389:std::complex<int>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:390:std::complex<int>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:391:std::complex<int>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:416:std::complex<int>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:417:std::complex<int>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:418:std::complex<int>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:430:std::complex<unsigned short>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:431:std::complex<unsigned short>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:432:std::complex<unsigned short>
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:444:std::complex< short >
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:445:std::complex< short >
Modules/Filtering/ImageManipulation/test/otbClampImageFilter.cxx:446:std::complex< short >