Skip to content

Commit

Permalink
Added add_lvalue_reference for rvalue reference
Browse files Browse the repository at this point in the history
  • Loading branch information
John Wellbelove committed Oct 28, 2023
1 parent f8d5c31 commit a09efff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/etl/generators/type_traits_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,9 @@ namespace etl
/// add_lvalue_reference
template <typename T> struct add_lvalue_reference { typedef T& type; };
template <typename T> struct add_lvalue_reference<T&> { typedef T& type; };
#if ETL_USING_CPP11
template <typename T> struct add_lvalue_reference<T&&> { typedef T& type; };
#endif
template <> struct add_lvalue_reference<void> { typedef void type; };
template <> struct add_lvalue_reference<const void> { typedef const void type; };
template <> struct add_lvalue_reference<volatile void> { typedef volatile void type; };
Expand Down
3 changes: 3 additions & 0 deletions include/etl/type_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,9 @@ namespace etl
/// add_lvalue_reference
template <typename T> struct add_lvalue_reference { typedef T& type; };
template <typename T> struct add_lvalue_reference<T&> { typedef T& type; };
#if ETL_USING_CPP11
template <typename T> struct add_lvalue_reference<T&&> { typedef T& type; };
#endif
template <> struct add_lvalue_reference<void> { typedef void type; };
template <> struct add_lvalue_reference<const void> { typedef const void type; };
template <> struct add_lvalue_reference<volatile void> { typedef volatile void type; };
Expand Down

0 comments on commit a09efff

Please sign in to comment.