A using-declaration can not be repeated in function scope. Why is that?
问题 In [namespace.udecl]/10 you have the following example: namespace A { int i; } namespace A1 { using A::i; using A::i; // OK: double declaration } void f() { using A::i; using A::i; // error: double declaration } This snippet compiles in clang. 回答1: The first is a declaration inside a namespace, and the multiple using statements could happen frequently using #includes. The second is inside a definition of a function, and you would never do that unless you made a mistake. You can't define the