use T everywhere and fix forwarding

This commit is contained in:
Sébastien Loriot 2022-08-09 22:22:02 +02:00
parent a1525c6367
commit 2f6beec951
1 changed files with 7 additions and 7 deletions

View File

@ -211,14 +211,14 @@ struct Identity_property_map
typedef T& reference; typedef T& reference;
typedef boost::lvalue_property_map_tag category; typedef boost::lvalue_property_map_tag category;
value_type& operator[](key_type& k) const { return k; } T& operator[](T& k) const { return k; }
const value_type& operator[](const key_type& k) const { return k; } const T& operator[](const T& k) const { return k; }
value_type operator[](const key_type&& k) const { return std::forward<T>(k); } T operator[](T&& k) const { return std::forward<T>(k); }
friend value_type& get(const Self&, key_type& k) { return k; } friend T& get(const Self&, T& k) { return k; }
friend const value_type& get(const Self&, const key_type& k) { return k; } friend const T& get(const Self&, const T& k) { return k; }
friend value_type get(const Self&, const key_type&& k) { return std::forward<T>(k); } friend T get(const Self&, T&& k) { return std::forward<T>(k); }
friend void put(const Self&, key_type& k, const value_type& v) { k = v; } friend void put(const Self&, T& k, const T& v) { k = v; }
/// \endcond /// \endcond
}; };