diff --git a/include/array_view.h b/include/array_view.h index 4d43b1f..ab41280 100644 --- a/include/array_view.h +++ b/include/array_view.h @@ -81,9 +81,9 @@ namespace details template friend class coordinate_facade; public: - using reference = typename std::add_lvalue_reference::type; - using const_reference = typename std::add_lvalue_reference::type>::type; - using value_type = typename std::remove_reference::type>::type; + using value_type = typename std::remove_reference::type; + using reference = typename std::add_lvalue_reference::type; + using const_reference = typename std::add_lvalue_reference::type>::type; static const unsigned int rank = Rank; _CONSTEXPR coordinate_facade() _NOEXCEPT { @@ -1363,9 +1363,9 @@ public: using bounds_type = BoundsType; using size_type = typename bounds_type::size_type; using index_type = typename bounds_type::index_type; - using value_type = ValueType; - using pointer = ValueType*; - using reference = ValueType&; + using value_type = typename std::remove_reference::type; + using pointer = typename std::add_pointer::type; + using reference = typename std::add_lvalue_reference::type; using iterator = std::conditional_t::value, contiguous_array_view_iterator, general_array_view_iterator>; using const_iterator = std::conditional_t::value, contiguous_array_view_iterator>, general_array_view_iterator>>; using reverse_iterator = std::reverse_iterator;