http://llvm.org/bugs/show_bug.cgi?id=20031

            Bug ID: 20031
           Summary: clang failed to report ambiguous member function calls
                    with the same name but different signature that are
                    inherited from multiple bases
           Product: clang
           Version: 3.4
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Clang compiles the following code fine, which is incorrect because operator()
should be ambiguous (as gcc4.8 is able to report).

#include <type_traits>
#include <functional>

template < typename... Sig >
struct function
 : std::function<Sig>...
{
   template < typename F >
   explicit function(const F& f)
    : std::function<Sig>(f)...
   {}
};

struct func
{
   template < typename... Args >
   void operator()(Args&&...) const
   {}
};

int main()
{
   func f0;
   function<void(int),void(double)> f1(f0);
   f1(0);
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to