Since operator << is declared as a friend, shouldn't it be able to see Format()? It does indeed see Format() if namespace is not used. Yet when declaring DDLTYP within namespace DDL, Format() becomes inaccessible. If I move Format() to public, it compiles. Why should the use of a namespace make a difference to the visibility of Format() assuming references are properly qualified with the DDL scope?