
29 Jun
2004
29 Jun
'04
4:43 p.m.
David Abrahams wrote:
Michael Glassford <glassfordm@hotmail.com> writes:
Also, going back to the struct technique, do the struct instances need to be in an anonymous namespace to prevent ODR violations? Just trying to get my head around the concept.
Probably they should be in a separate namespace, though possibly not anonymous.
Anonymous namespaces in header files *cause* ODR violations. Not sure how they can be used to prevent ODR violations.
Peter, are you planning to get the bind placeholders out of the unnamed namespace?
I'm not sure how the bind placeholders can cause ODR violations; could you elaborate? Anyway, I guess we'll have to migrate to TR1 style placeholders one day, but this will break existing code.