3 #if !defined(CPPLINQ_LINQ_LAST_HPP) 4 #define CPPLINQ_LINQ_LAST_HPP 9 template <
class Cursor>
10 typename Cursor::element_type
13 if (c.empty()) {
throw std::logic_error(
"last() out of bounds"); }
14 typename Cursor::element_type elem = c.get();
25 template <
class Cursor>
26 typename Cursor::reference_type
29 if (c.empty()) {
throw std::logic_error(
"last() out of bounds"); }
39 template <
class Cursor>
40 typename Cursor::reference_type
43 if (c.empty()) {
throw std::logic_error(
"last() out of bounds"); }
48 template <
class Cursor>
49 typename Cursor::element_type
52 typename Cursor::element_type elem;
60 template <
class Cursor>
61 typename Cursor::element_type
64 if (c.empty()) {
throw std::logic_error(
"last() out of bounds"); }
74 template <
class Cursor>
75 typename Cursor::element_type
78 if (c.empty()) {
return typename Cursor::element_type(); }
85 #endif // CPPLINQ_LINQ_LAST_HPP Definition: linq_cursor.hpp:63
Definition: linq_cursor.hpp:66
Cursor::element_type linq_last_(Cursor c, onepass_cursor_tag)
Definition: linq_last.hpp:11
Definition: linq_cursor.hpp:64
Cursor::element_type linq_last_or_default_(Cursor c, onepass_cursor_tag)
Definition: linq_last.hpp:50