[2/2] meson: Use <version> header for C++ library version check
diff mbox series

Message ID 20260405222705.1238116-2-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • [1/2] Documentation: Update to C++20
Related show

Commit Message

Laurent Pinchart April 5, 2026, 10:27 p.m. UTC
The ciso646 header has been removed in C++20. Use the version header
instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 meson.build | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Jacopo Mondi April 7, 2026, 10:03 a.m. UTC | #1
Hi Laurent

On Mon, Apr 06, 2026 at 01:27:05AM +0300, Laurent Pinchart wrote:
> The ciso646 header has been removed in C++20. Use the version header
> instead.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

thanks
  j
> ---
>  meson.build | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index a6cfdd07605c..a411d171d9db 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -118,10 +118,9 @@ cpp_arguments = [
>      '-Wnon-virtual-dtor',
>  ]
>
> -# \todo Switch to `version` when moving to C++20 as `ciso646` has been removed in C++20.
> -if cxx.has_header_symbol('ciso646', '_LIBCPP_VERSION')
> +if cxx.has_header_symbol('version', '_LIBCPP_VERSION')
>      cxx_stdlib = 'libc++'
> -elif cxx.has_header_symbol('ciso646', '__GLIBCXX__')
> +elif cxx.has_header_symbol('version', '__GLIBCXX__')
>      cxx_stdlib = 'libstdc++'
>  else
>      error('C++ standard library cannot be detected')
> --
> Regards,
>
> Laurent Pinchart
>
Barnabás Pőcze April 13, 2026, 6:53 a.m. UTC | #2
2026. 04. 06. 0:27 keltezéssel, Laurent Pinchart írta:
> The ciso646 header has been removed in C++20. Use the version header
> instead.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---

Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>


>   meson.build | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index a6cfdd07605c..a411d171d9db 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -118,10 +118,9 @@ cpp_arguments = [
>       '-Wnon-virtual-dtor',
>   ]
>   
> -# \todo Switch to `version` when moving to C++20 as `ciso646` has been removed in C++20.
> -if cxx.has_header_symbol('ciso646', '_LIBCPP_VERSION')
> +if cxx.has_header_symbol('version', '_LIBCPP_VERSION')
>       cxx_stdlib = 'libc++'
> -elif cxx.has_header_symbol('ciso646', '__GLIBCXX__')
> +elif cxx.has_header_symbol('version', '__GLIBCXX__')
>       cxx_stdlib = 'libstdc++'
>   else
>       error('C++ standard library cannot be detected')

Patch
diff mbox series

diff --git a/meson.build b/meson.build
index a6cfdd07605c..a411d171d9db 100644
--- a/meson.build
+++ b/meson.build
@@ -118,10 +118,9 @@  cpp_arguments = [
     '-Wnon-virtual-dtor',
 ]
 
-# \todo Switch to `version` when moving to C++20 as `ciso646` has been removed in C++20.
-if cxx.has_header_symbol('ciso646', '_LIBCPP_VERSION')
+if cxx.has_header_symbol('version', '_LIBCPP_VERSION')
     cxx_stdlib = 'libc++'
-elif cxx.has_header_symbol('ciso646', '__GLIBCXX__')
+elif cxx.has_header_symbol('version', '__GLIBCXX__')
     cxx_stdlib = 'libstdc++'
 else
     error('C++ standard library cannot be detected')