We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent befeb54 commit 8916f51Copy full SHA for 8916f51
include/nanobind/make_iterator.h
@@ -33,12 +33,12 @@ template <typename Iterator> struct iterator_access {
33
};
34
35
template <typename Iterator> struct iterator_key_access {
36
- using result_type = decltype((*std::declval<Iterator &>()).first);
+ using result_type = const decltype((*std::declval<Iterator &>()).first) &;
37
result_type operator()(Iterator &it) const { return (*it).first; }
38
39
40
template <typename Iterator> struct iterator_value_access {
41
- using result_type = decltype((*std::declval<Iterator &>()).second);
+ using result_type = const decltype((*std::declval<Iterator &>()).second) &;
42
result_type operator()(Iterator &it) const { return (*it).second; }
43
44
0 commit comments