2015-05-02 Jonathan Wakely <jwakely@redhat.com>
+ * include/experimental/iterator (ostream_joiner): Simplify by using
+ the injected-class-name and the ostream_type typedef.
+
* include/experimental/iterator: New. Define ostream_joiner.
* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
{ }
template<typename _Tp>
- ostream_joiner<_DelimT, _CharT, _Traits>&
+ ostream_joiner&
operator=(const _Tp& __value)
{
if (!_M_first)
return *this;
}
- ostream_joiner<_DelimT, _CharT, _Traits>&
- operator*() noexcept
- { return *this; }
-
- ostream_joiner<_DelimT, _CharT, _Traits>&
- operator++() noexcept
- { return *this; }
-
- ostream_joiner<_DelimT, _CharT, _Traits>&
- operator++(int) noexcept
- { return *this; }
+ ostream_joiner& operator*() noexcept { return *this; }
+ ostream_joiner& operator++() noexcept { return *this; }
+ ostream_joiner& operator++(int) noexcept { return *this; }
private:
- basic_ostream<_CharT, _Traits>* _M_out;
+ ostream_type* _M_out;
_DelimT _M_delim;
bool _M_first = true;
};
inline ostream_joiner<decay_t<_DelimT>, _CharT, _Traits>
make_ostream_joiner(basic_ostream<_CharT, _Traits>& __os,
_DelimT&& __delimiter)
- {
- return { __os, std::forward<_DelimT>(__delimiter) };
- }
+ { return { __os, std::forward<_DelimT>(__delimiter) }; }
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace fundamentals_v2