On 01/26/2015 10:51 AM, pulkomandy@xxxxxxxxxxxxx wrote:
############################################################################ Revision: hrev48723 Commit: e9b82428687037c1998e7140661a249710dd93c8 URL: http://cgit.haiku-os.org/haiku/commit/?id=e9b824286870 Author: Adrien Destugues <pulkomandy@xxxxxxxxx> Date: Thu Jan 22 13:36:40 2015 UTC Add a BConstReference class. This is a BReference that allows only const access to the referenced object. This was not easily possible with the existing BReference for two reasons: * BReference<const Type> would not work, as BReference needs to change the reference count of the referenced object. Adding mutable and casting where appropriate wouldwork but,
Why not provide a specialization for const types instead? It would save the additional class and avoid the fairly ugly implementation.
CU, Ingo