24 Sep
2007
24 Sep
'07
8:01 a.m.
Boris skrev:
Before anyone refers me to the FAQ at http://www.boost.org/libs/ptr_container/doc/faq.html#why-does-ptr-map-t-inse... - I read it. While it's clear why a reference is used I don't understand why it is a *non-const* reference. Any reason why it's not const?
A temporary object can bind to a const reference, thus a call to a throwing constructor can be placed as the key argument. -Thorsten