1 // { dg-do compile { target c++11 } }
2 // Copyright (C) 2005 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 16 Sep 2005 <nathan@codesourcery.com>
5 // PR 23519 template specialization ordering (DR214)
6 // Origin: Maxim Yegorushkin <maxim.yegorushkin@gmail.com>
8 // DR532 clarified that the * expression is ambiguous.
12 template<class T> int operator+(T&) = delete;
15 template<class T> struct B
17 int operator-(A&) {return 2;}
18 template<typename R> int operator*(R&) {return 3;}
21 template <typename T, typename R> int operator-(B<T>, R&) = delete;
22 template<class T> int operator+(A&, B<T>&) { return 5;}
23 template <typename T> int operator*(T &, A&){return 6;}
35 if ((b * a) != 6) // { dg-error "ambiguous" }