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

            Bug ID: 50561
           Summary: Concepts overload check not considered?
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

I'm not sure whose bug this is, my concepts aren't particularly great yet,
but...

https://godbolt.org/z/acK51xve3

template <typename a> 
concept bd = a::c;

template <typename, typename as, typename... be> 
void bf(as, be...);

template <bd a, typename as> 
void bf(as) { 
   using bg = typename a::second_type; 
}

template <typename, typename> class vector {
    static constexpr bool c = false; // #1
};

void b() {
  bf<vector<int, int>>(0); 
}


GCC selects the 1st overload of 'bf', clang chooses the 2nd overload.  Neither
compiler seems to consider the line on #1. It can be 'true' 'false' or not
existent.

It seems to me that the concept 'bd' should NOT match vector if 'c' is false or
non-existent, so I would expect it to choose the 1st overload.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to