Quantcast
Channel: How does QDebug()
Viewing all articles
Browse latest Browse all 5

Answer by dirkgently for How does QDebug()

$
0
0

The stream insertion (<<) and extraction (>>) are supposed to be non-members.

My question is basically, how can I tell when the return type of operator<< isn't going to be used by another operator<< (and so append endl)?

You cannot. Create a member function to specially append this or append an endl once those chained calls are done with. Document your class well so that the clients know how to use it. That's your best bet.


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>