From 742138d88f07b946b12ec235c069d4c68236404f Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sun, 2 Nov 2025 17:06:34 +0100 Subject: [PATCH] Avoid warning in `launder_cast` This fixes a warning for `launder_cast(ptr)` as it adds `const` in the argument and then C-casts it away which triggers `-Wcast-qual` --- include/boost/move/detail/launder.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/move/detail/launder.hpp b/include/boost/move/detail/launder.hpp index a6236de..ca5d851 100644 --- a/include/boost/move/detail/launder.hpp +++ b/include/boost/move/detail/launder.hpp @@ -44,7 +44,7 @@ BOOST_MOVE_FORCEINLINE T* launder(T* p) template BOOST_MOVE_FORCEINLINE T launder_cast(const volatile void* p) { - return (launder)((T)p); + return (launder)(static_cast(const_cast(p))); } } //namespace move_detail {