Boost logo

Boost :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2004-07-10 09:51:18


On Jul 10, 2004, at 8:53 AM, David Abrahams wrote:

> "Arkadiy Vertleyb" <vertleyb_at_[hidden]> writes:
>
> I'm not convinced that this particular ODR violation ends up being a
> problem in practice, though -- ultimately we end up getting the same
> type out of any typeof(...), and if we're never generating linker
> symbols within the computation performed by typeof, we're probably
> going to get away with it. I think it's worth trying an automatic
> scheme and stress-testing it to see if we can make it break. Better
> yet, explicitly construct a pared-down version _designed_ to break
> and see if we can cause a problem.

The only time I've ever seen a compiler/toolchain diagnose an ODR
violation is when it results in two symbols with the same name and
different sizes being linked together. As you said, we're not
generating anything for the linker so this case won't crop up. Fear,
Uncertainty, and Doubt make me wonder if trying to use Arkadiy's typeof
in an exported template would trigger an ODR violation diagnostic in an
EDG compiler, but I have neither proof nor the compiler around.

I say we try to get away with the ODR violation. We know we're getting
typeof/decltype eventually, so the ODR violation will eventually
disappear anyway.

        Doug


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