From d33254fca5d6a988273ebc4eae4bc19f885b18d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sun, 30 Nov 2025 22:52:38 +0100 Subject: [PATCH] Add missing specialization if "add_rvalue_reference" for array types that returns an lvalue reference so that some old compilers don't return errors when using declval() --- include/boost/move/detail/meta_utils.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/move/detail/meta_utils.hpp b/include/boost/move/detail/meta_utils.hpp index ae0344a..46883a8 100644 --- a/include/boost/move/detail/meta_utils.hpp +++ b/include/boost/move/detail/meta_utils.hpp @@ -18,6 +18,7 @@ # pragma once #endif +#include #include //forceinline #include #include @@ -527,6 +528,10 @@ template< class T > struct add_rvalue_reference { typedef T & type; }; +template< class T, std::size_t N > +struct add_rvalue_reference +{ typedef T (&type)[N]; }; + #endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template< class T > struct remove_rvalue_reference { typedef T type; };