https://llvm.org/bugs/show_bug.cgi?id=28195

            Bug ID: 28195
           Summary: Clang allows ambiguous derived-to-base pointer
                    conversion.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: e...@efcs.ca
                CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
    Classification: Unclassified

For example:

#include <cassert>

template <int N> struct Base { };
struct Der : Base<1>, Base<2> {};

template <int N> bool found_base(const Base<N>*)  { return true; }
bool                  found_base(...)             { return false; }

int main() { const Der d; assert(found_base(&d) == false); }

In the above example Clang selects the conversion to const Base<2>*.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to