27 #ifndef NDN_UTIL_BACKPORTS_OSTREAM_JOINER_HPP 28 #define NDN_UTIL_BACKPORTS_OSTREAM_JOINER_HPP 32 #if (__cplusplus >= 201402L) && 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>
119 return {os, std::forward<DelimT>(delimiter)};
124 #endif // NDN_CXX_HAVE_EXPERIMENTAL_OSTREAM_JOINER 125 #endif // NDN_UTIL_BACKPORTS_OSTREAM_JOINER_HPP Copyright (c) 2013-2017 Regents of the University of California.
ostream_joiner & operator*() noexcept
std::output_iterator_tag iterator_category
ostream_joiner & operator=(const T &value)
ostream_joiner(ostream_type &os, const DelimT &delimiter) noexcept(std::is_nothrow_copy_constructible< DelimT >::value)
ostream_joiner< typename std::decay< DelimT >::type, CharT, Traits > make_ostream_joiner(std::basic_ostream< CharT, Traits > &os, DelimT &&delimiter)
ostream_joiner(ostream_type &os, DelimT &&delimiter) noexcept(std::is_nothrow_move_constructible< DelimT >::value)
ostream_joiner & operator++(int) noexcept
ostream_joiner & operator++() noexcept
std::basic_ostream< CharT, Traits > ostream_type