27 #ifndef NDN_CXX_UTIL_OSTREAM_JOINER_HPP
28 #define NDN_CXX_UTIL_OSTREAM_JOINER_HPP
32 #if NDN_CXX_HAS_INCLUDE(<experimental/iterator>)
33 # include <experimental/iterator>
34 # if __cpp_lib_experimental_ostream_joiner >= 201411
35 # define NDN_CXX_HAVE_EXPERIMENTAL_OSTREAM_JOINER
39 #ifdef NDN_CXX_HAVE_EXPERIMENTAL_OSTREAM_JOINER
42 using std::experimental::ostream_joiner;
52 template<
typename DelimT,
53 typename CharT = char,
54 typename Traits = std::char_traits<CharT>>
68 noexcept(std::is_nothrow_copy_constructible<DelimT>::value)
69 : m_os(std::addressof(os)), m_delim(delimiter)
74 noexcept(std::is_nothrow_move_constructible<DelimT>::value)
75 : m_os(std::addressof(os)), m_delim(std::move(delimiter))
112 bool m_isFirst =
true;
115 template<
typename CharT,
typename Traits,
typename DelimT>
116 inline ostream_joiner<std::decay_t<DelimT>, CharT, Traits>
119 return {os, std::forward<DelimT>(delimiter)};
std::basic_ostream< CharT, Traits > ostream_type
ostream_joiner(ostream_type &os, const DelimT &delimiter) noexcept(std::is_nothrow_copy_constructible< DelimT >::value)
ostream_joiner & operator*() noexcept
ostream_joiner(ostream_type &os, DelimT &&delimiter) noexcept(std::is_nothrow_move_constructible< DelimT >::value)
ostream_joiner & operator++(int) noexcept
std::output_iterator_tag iterator_category
ostream_joiner & operator++() noexcept
ostream_joiner & operator=(const T &value)
ostream_joiner< std::decay_t< DelimT >, CharT, Traits > make_ostream_joiner(std::basic_ostream< CharT, Traits > &os, DelimT &&delimiter)