This is simpler and cleaner than my previous attempt. Thanks to Ingo for suggesting this.
49e8a3c BReferencable: implement const references with specialization
headers/os/support/Referenceable.h | 116 ++++++++++++++++++++++++++++--------
1 file changed, 91 insertions(+), 25 deletions(-)
Upstream: cgit.haiku-os.org