
"Alexander Nasonov" <alnsn@yandex.ru> 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