Writing ‘endl’ like functions for output streams

Ever wondered how endl works! Quite simple, endl is just a function with a predefined signature and output streams has ‘operator <<‘ overloaded to take function pointers which satisfy this particular signature, so whenever it finds such a function the compiler just calls this operator with argument set to pointer to this function which in […]
Continue reading…