Line data Source code
1 : /* 2 : An output iterator which simply discards output. 3 : */ 4 : // Copyright Frank Mori Hess 2008. 5 : // Distributed under the Boost Software License, Version 6 : // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 7 : // http://www.boost.org/LICENSE_1_0.txt) 8 : 9 : // See http://www.boost.org/libs/signals2 for library home page. 10 : 11 : #ifndef BOOST_SIGNALS2_NULL_OUTPUT_ITERATOR_HPP 12 : #define BOOST_SIGNALS2_NULL_OUTPUT_ITERATOR_HPP 13 : 14 : #include <boost/iterator/function_output_iterator.hpp> 15 : 16 : namespace boost 17 : { 18 : namespace signals2 19 : { 20 : namespace detail 21 : { 22 : class does_nothing 23 : { 24 : public: 25 : template<typename T> 26 0 : void operator()(const T&) const 27 0 : {} 28 : }; 29 : typedef boost::function_output_iterator<does_nothing> null_output_iterator; 30 : } // namespace detail 31 : } // namespace signals2 32 : } // namespace boost 33 : 34 : #endif // BOOST_SIGNALS2_NULL_OUTPUT_ITERATOR_HPP