Today we get new win-clang build error
'allocator_traits' cannot
be specialized: Specializing this standard library template is forbidden
by N5014 [allocator.traits.general
as workaround we disable it with:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-specialization")
And have build successful:
Should this error be fixed? If so, I need help, as I don't yet understand all the dependencies of this code.
D:/a/SQLfb/SQLfb/src/include\../common/classes/alloc.h:563:13: error: 'allocator_traits' cannot be specialized: Specializing this standard library template is forbidden by N5014 [allocator.traits.general]/1 [-Winvalid-specialization]
563 | struct std::allocator_traits<Firebird::PoolAllocator<TAlloc>>
C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\xmemory:755:8: note: marked 'no_specializations' here
755 | struct _NO_SPECIALIZATIONS_CITING("N5014 [allocator.traits.general]/1") allocator_traits
C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\yvals_core.h:707:5: note: expanded from macro '_NO_SPECIALIZATIONS_CITING'
707 | _NO_SPECIALIZATIONS_MSG("Specializing this standard library template is forbidden by " _Standardese)
C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\yvals_core.h:701:41: note: expanded from macro '_NO_SPECIALIZATIONS_MSG'
701 | #define _NO_SPECIALIZATIONS_MSG(_Msg) [[_Clang::__no_specializations__(_Msg)]]
In file included from D:/a/SQLfb/SQLfb/src/gpre/c_cxx.cpp:37:
In file included from D:/a/SQLfb/SQLfb/src/gpre\../gpre/gpre.h:70:
In file included from D:/a/SQLfb/SQLfb/src/gpre\../gpre\../common/utils_proto.h:36:
In file included from D:/a/SQLfb/SQLfb/src/gpre\../gpre\../common\../common/classes/fb_string.h:42:
D:/a/SQLfb/SQLfb/src/include\../common/classes/alloc.h:563:13: error: 'allocator_traits' cannot be specialized: Specializing this standard library template is forbidden by N5014 [allocator.traits.general]/1 [-Winvalid-specialization]
563 | struct std::allocator_traits<Firebird::PoolAllocator<TAlloc>>
C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\xmemory:755:8: note: marked 'no_specializations' here
755 | struct _NO_SPECIALIZATIONS_CITING("N5014 [allocator.traits.general]/1") allocator_traits