Skip to content

Commit d33254f

Browse files
committed
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()
1 parent 00005cb commit d33254f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

include/boost/move/detail/meta_utils.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# pragma once
1919
#endif
2020

21+
#include <cstddef>
2122
#include <boost/move/detail/workaround.hpp> //forceinline
2223
#include <boost/move/detail/meta_utils_core.hpp>
2324
#include <boost/move/detail/addressof.hpp>
@@ -527,6 +528,10 @@ template< class T >
527528
struct add_rvalue_reference<T &>
528529
{ typedef T & type; };
529530

531+
template< class T, std::size_t N >
532+
struct add_rvalue_reference<T[N]>
533+
{ typedef T (&type)[N]; };
534+
530535
#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
531536

532537
template< class T > struct remove_rvalue_reference { typedef T type; };

0 commit comments

Comments
 (0)