Move is_specialisation_of to another header file
Jonathan Wakely
jwakely@redhat.com
Thu Jan 8 10:50:35 GMT 2026
On Thu, 8 Jan 2026 at 10:15, Frederick Virchanza Gotham
<cauldwell.thomas@gmail.com> wrote:
>
> In the file "std/format", we have:
>
> /// @cond undocumented
> template<typename _Tp, template<typename...> class _Class>
> constexpr bool __is_specialization_of = false;
> template<template<typename...> class _Class, typename... _Args>
> constexpr bool __is_specialization_of<_Class<_Args...>, _Class> = true;
>
> I need to use this template in my own header file
> "bits/chimeric_ptr.h", and so in order to avoid code duplication, I
> think we should move it to a different header file.
>
> The functionality of this template is so basic that I think we should
> move it to "bits/c++config".
Certainly not. It belongs in <type_traits> or bits/utility.h, but not
bits/c++config.h
More information about the Libstdc++
mailing list