boost::signals2::last_value — 评估一个 InputIterator 序列,并返回序列中的最后一个值。
// In header: <boost/signals2/last_value.hpp> template<typename T> class last_value { public: // types typedef T result_type; // invocation template<typename InputIterator> result_type operator()(InputIterator, InputIterator) const; };
last_value
类是原始 Signals 库中 signals 的默认 Combiner
模板参数类型。Signals2 使用 optional_last_value 作为默认值,它不会抛出异常。
last_value
调用template<typename InputIterator> result_type operator()(InputIterator first, InputIterator last) const;
效果 |
尝试解引用序列 |
返回 |
最后一次成功迭代器解引用的结果。 |
抛出 |
如果没有迭代器成功解引用,则抛出 no_slots_error 异常,除非 |