Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2006-01-07 09:02:32


"Alexander Nasonov" <alnsn_at_[hidden]> wrote

> Tobias Schwinger wrote:
[...]

It seems that recently discovered problems in typeof all have the same
origin:

[some compilers][in some contexts] can't bind some types to const T&

The remedy seems to be to add overload(s) that handle this particular case.
It also looks such overloads should be added on per-compiler basis,
otherwise new problems may be introduced.

As was mentioned before, if such a problem exists, it exists in 4 contexts:

1) ensure_obj (native typeof wrapping);
2) typeof emulation;
3) MSVC typeof trick;
4) LVALUE_TYPEOF.

I am afraid that it all in 4 places will pollute the code with
compiler-specific workarounds...

OTOH, it looks like all the workarounds just define _additional_ overloads.
So what if we add a separate header for every "broken" compiler? Such
headers would have all the additional overloads, possibly #ifdeffed by the
compiler version, and #included during configuration?

Thoughts?

Regards,
Arkadiy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk