win-clang-cmake C++23 prerecured error

33 views
Skip to first unread message

Sergey Khalyutin

unread,
Jun 16, 2026, 5:55:06 AM (7 days ago) Jun 16
to firebird-devel
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
| ^
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/remote/merge.cpp:27:
In file included from D:/a/SQLfb/SQLfb/src/remote\../remote/remote.h:481:
In file included from D:/a/SQLfb/SQLfb/src/remote\../remote\../common/dsc.h:32:
[ 9%] Building C object extern/CMakeFiles/tommath.dir/libtommath/bn_mp_get_l.c.obj

Adriano dos Santos Fernandes

unread,
Jun 16, 2026, 10:00:53 PM (7 days ago) Jun 16
to firebir...@googlegroups.com
On 6/16/26 06:55, Sergey Khalyutin wrote:
> 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
> https://github.com/notesoft/SQLfb/actions/runs/27599626245/job/81597324389
>
> as workaround we disable it with:
> set(CMAKE_CXX_FLAGS"${CMAKE_CXX_FLAGS}-Wno-invalid-specialization")
> And have build successful:
> https://github.com/notesoft/SQLfb/actions/runs/27606592508/job/81620041595
>
> Should this error be fixed? If so, I need help, as I don't yet
> understand all the dependencies of this code.
>

It's causing warning in VS 2026 too.

I removed the specialization now, let's see if all builds works.


Adriano

Sergey Khalyutin

unread,
Jun 17, 2026, 2:36:26 AM (7 days ago) Jun 17
to firebird-devel
We remove  -Wno-invalid-specialization and builds - ok.


Thanks,  Adriano.
Reply all
Reply to author
Forward
0 new messages