diff mbox series

[01/10] libstdc++: Remove unnecessary 'static' from __is_specialization_of

Message ID 66f1fd28.170a0220.16c8a7.03b1@mx.google.com
State New
Headers show
Series c++/modules: Implement P1815 "Translation-unit-local entities" | expand

Commit Message

Nathaniel Shead Sept. 23, 2024, 11:43 p.m. UTC
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk?

-- >8 --

This makes the declarations internal linkage, which is an ODR issue, and
causes a future modules patch to fail regtest as it now detects attempted
uses of TU-local entities in module CMIs.

libstdc++-v3/ChangeLog:

	* include/std/format: Remove unnecessary 'static'.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
---
 libstdc++-v3/include/std/format | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Jonathan Wakely Sept. 24, 2024, 6:45 a.m. UTC | #1
On Tue, 24 Sept 2024, 00:44 Nathaniel Shead, <nathanieloshead@gmail.com>
wrote:

> Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk?
>

OK, thanks


> -- >8 --
>
> This makes the declarations internal linkage, which is an ODR issue, and
> causes a future modules patch to fail regtest as it now detects attempted
> uses of TU-local entities in module CMIs.
>
> libstdc++-v3/ChangeLog:
>
>         * include/std/format: Remove unnecessary 'static'.
>
> Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
> ---
>  libstdc++-v3/include/std/format | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/libstdc++-v3/include/std/format
> b/libstdc++-v3/include/std/format
> index e963d7f79b3..d9014d111b1 100644
> --- a/libstdc++-v3/include/std/format
> +++ b/libstdc++-v3/include/std/format
> @@ -361,10 +361,9 @@ namespace __format
>
>  /// @cond undocumented
>    template<typename _Tp, template<typename...> class _Class>
> -    static constexpr bool __is_specialization_of = false;
> +    constexpr bool __is_specialization_of = false;
>    template<template<typename...> class _Class, typename... _Args>
> -    static constexpr bool __is_specialization_of<_Class<_Args...>, _Class>
> -      = true;
> +    constexpr bool __is_specialization_of<_Class<_Args...>, _Class> =
> true;
>
>  namespace __format
>  {
> --
> 2.46.0
>
>
diff mbox series

Patch

diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format
index e963d7f79b3..d9014d111b1 100644
--- a/libstdc++-v3/include/std/format
+++ b/libstdc++-v3/include/std/format
@@ -361,10 +361,9 @@  namespace __format
 
 /// @cond undocumented
   template<typename _Tp, template<typename...> class _Class>
-    static constexpr bool __is_specialization_of = false;
+    constexpr bool __is_specialization_of = false;
   template<template<typename...> class _Class, typename... _Args>
-    static constexpr bool __is_specialization_of<_Class<_Args...>, _Class>
-      = true;
+    constexpr bool __is_specialization_of<_Class<_Args...>, _Class> = true;
 
 namespace __format
 {