2
0
mirror of https://github.com/boostorg/move.git synced 2026-01-19 04:22:10 +00:00

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()

This commit is contained in:
Ion Gaztañaga
2025-11-30 22:52:38 +01:00
parent 00005cb732
commit d33254fca5

View File

@@ -18,6 +18,7 @@
# pragma once # pragma once
#endif #endif
#include <cstddef>
#include <boost/move/detail/workaround.hpp> //forceinline #include <boost/move/detail/workaround.hpp> //forceinline
#include <boost/move/detail/meta_utils_core.hpp> #include <boost/move/detail/meta_utils_core.hpp>
#include <boost/move/detail/addressof.hpp> #include <boost/move/detail/addressof.hpp>
@@ -527,6 +528,10 @@ template< class T >
struct add_rvalue_reference<T &> struct add_rvalue_reference<T &>
{ typedef T & type; }; { typedef T & type; };
template< class T, std::size_t N >
struct add_rvalue_reference<T[N]>
{ typedef T (&type)[N]; };
#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template< class T > struct remove_rvalue_reference { typedef T type; }; template< class T > struct remove_rvalue_reference { typedef T type; };