History log of /haiku/headers/os/support/Referenceable.h
Revision Date Author Comments
# 22817d22 16-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PVS V591: non void functions must return something

Change-Id: I1f4276bc32afab75cf857c143d2bdb4fc3b578b1
Reviewed-on: https://review.haiku-os.org/c/1612
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>


# 404cb7e3 14-Jun-2015 Adrien Destugues <pulkomandy@gmail.com>

BReference: missing const cast when building a BReference<const>

* The internal BReference is on a non-const object so it can increment
and decrement the reference count, so we need to cast the const away.


# e25776bd 07-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

Whitespace cleanup only.


# 49e8a3c6 27-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

BReferencable: implement const references with specialization

This is simpler and cleaner than my previous attempt. Thanks to Ingo for
suggesting this.


# e9b82428 22-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

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,
* It is now also possible to assign a BReference to a BConstReference
(to the same type, of course). The reverse is not allowed, making it
more difficult to "const cast" the referenced object (it's still
possible to "get" the object pointer and cast that).

BConstReference can be used to provide shared read-only access to an
object, for example this can be used to cache non-copiable or
expansive to create objects.


# b92e7f15 11-Jun-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Make BReferenceable public.

* The Network Kit now makes use of it for BUrlContext, so we need this
in the public headers.
* Problem caught by the new build bot by compiling the unit tests.


# 404cb7e3108ca8a7857962a6cc847955881a9cff 14-Jun-2015 Adrien Destugues <pulkomandy@gmail.com>

BReference: missing const cast when building a BReference<const>

* The internal BReference is on a non-const object so it can increment
and decrement the reference count, so we need to cast the const away.


# e25776bd83f3f3659f6c69fd3b74491899547a10 07-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

Whitespace cleanup only.


# 49e8a3c652c6954b1066b6974479e3412915956e 27-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

BReferencable: implement const references with specialization

This is simpler and cleaner than my previous attempt. Thanks to Ingo for
suggesting this.


# e9b82428687037c1998e7140661a249710dd93c8 22-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

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,
* It is now also possible to assign a BReference to a BConstReference
(to the same type, of course). The reverse is not allowed, making it
more difficult to "const cast" the referenced object (it's still
possible to "get" the object pointer and cast that).

BConstReference can be used to provide shared read-only access to an
object, for example this can be used to cache non-copiable or
expansive to create objects.


# b92e7f151247957b551d480cc87027c403754b94 11-Jun-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Make BReferenceable public.

* The Network Kit now makes use of it for BUrlContext, so we need this
in the public headers.
* Problem caught by the new build bot by compiling the unit tests.