38 #ifndef DOXYGEN_IGNORE_INTERNAL
40 static struct noendl_s {} noendl;
42 template <
class T>
struct NotFirst {
43 inline NotFirst(T & d) : data(d), last(true) {}
44 inline ~NotFirst() {
if(last) data << std::endl; }
49 inline NotFirst<T> & operator,(
const S & arg ){
50 data << data.fill() << arg;
54 inline T & operator,(T & (*modifier)(T &)){
60 inline NotFirst<T> & operator,( noendl_s & arg ){
66 template <
class T,
class Char,
class Traits>
67 inline NotFirst<std::basic_ostream<Char,Traits> > operator,(std::basic_ostream<Char,Traits> & stream,
const T & arg ){
69 return NotFirst<std::basic_ostream<Char,Traits> >(stream);
72 template <
class Char,
class Traits>
73 inline std::basic_ostream<Char,Traits> & operator,(std::basic_ostream<Char,Traits> & stream, std::basic_ostream<Char,Traits> & (*modifier)(std::basic_ostream<Char,Traits> &)){
78 template <
class Char,
class Traits>
79 inline std::basic_ostream<Char,Traits> & operator,(std::basic_ostream<Char,Traits> & stream, noendl_s & arg ){
87 struct like_print_s{};
90 template<
class S>
struct add_fill_bound
96 template<
class C> add_fill_bound&
operator<<(
const C& c)
117 if(fptr ==
static_cast<S&(*)(S&)
>(std::endl))
129 template<
class S>
struct like_print_bound:
public add_fill_bound<S>
131 like_print_bound(S&os)
132 :add_fill_bound<S>(os)
174 static struct Internal::like_print_s
print;
190 #ifndef DOXYGEN_IGNORE_INTERNAL
192 template<
class Char,
class Traits> Internal::add_fill_bound<std::basic_ostream<Char,Traits> > operator<<(std::basic_ostream<Char,Traits>& o,
const Internal::add_fill_s&)
194 return Internal::add_fill_bound<std::basic_ostream<Char,Traits> >(o);
197 template<
class Char,
class Traits> Internal::like_print_bound<std::basic_ostream<Char,Traits> > operator<<(std::basic_ostream<Char,Traits>& o,
const Internal::like_print_s&)
199 return Internal::like_print_bound<std::basic_ostream<Char,Traits> >(o);
204 #ifndef DOXYGEN_IGNORE_INTERNAL
207 template<
class A,
class B>
struct refpair
211 refpair(A& aa, B& bb)
215 void operator=(
const std::pair<A,B>& p)
236 template<
class A,
class B> Internal::refpair<A,B>
rpair(A&aa, B&bb)
238 return Internal::refpair<A,B>(aa, bb);