I always believed that temporary objects in C++ are automatically considered as const by the compiler. But recently I experienced that the following example of code:
No, they're not. Not unless you declare the return type as const.