[mythtv] [mythtv-commits] Ticket #2561: VideoListImp uses meta_dir_node from anonymous namespace: violates ODR

Anduin Withers awithers at anduin.com
Tue Oct 10 21:12:26 UTC 2006

>  After the latest gcc in FC6 not building mythplugins anymore on x86_64 I
>  filed a bug against redhat.com.
>  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=210129
>  Since VideoListImp is referenced in VideoList (and videolist.h) it is
> used
>  in more than one translation unit anonymous namespaces are private per
>  unit.

Essentially the code is:

// test.h
class bar {
    class barimp *m_imp;

// test.cpp
namespace {
    class foo {};

class barimp {
    foo test;

Any time they don't like something it is an ODR violation. In the above code
barimp is only ever defined in a single translation unit, ODR would never
enter its sad life.


Doesn't seem applicable to me.


Is closer in that VideoListImp is an opaque type everywhere but in

So I assume if you do something simple like comment out the unnamed
namespaces in videolist.cpp it all works?

Anduin Withers

More information about the mythtv-dev mailing list