[Bug c++/42687] New: The prevention of ADL with the help of parentheses doesn't work
g++ doesn't accept correct code: namespace N { struct S { }; void f(const S &) { } } void f(const N::S &) { } int main() { N::S v; (f)(v); // no ambiguity: ADL is prevented with (), only ::f is considered } -- References: 1) http://www.josuttis.com/tmplbook/ - "9.2.1 Argument-Dependent Lookup", page 123. 2) http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n3000.pdf - "3.4.2 Argument-dependent name lookup", example on page 46. -- Summary: The prevention of ADL with the help of parentheses doesn't work Product: gcc Version: 4.4.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: max at e-soft dot ru http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42687
[Bug c++/42784] New: using declaration conflicts with a different declaration in one class.
g++ doesn't accept this code: template struct K; template struct K { void f(); }; template struct K : public K { using K::f; typedef const char A[N*I]; void f(const A &) const; }; template struct Q : public K, public K { using K::f; using K::f; // error: using declaration using K<4, 4>::f conflicts with a previous using declaration }; int main() { Q<5> v; char a5x3[15]; v.f(a5x3); char a4x2[8]; v.f(a4x2); } -- Summary: using declaration conflicts with a different declaration in one class. Product: gcc Version: 4.4.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: max at e-soft dot ru GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42784