From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- .../over.match.best/over.ics.rank/p3-0x.cpp | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 clang/test/CXX/over/over.match/over.match.best/over.ics.rank/p3-0x.cpp (limited to 'clang/test/CXX/over/over.match/over.match.best/over.ics.rank') diff --git a/clang/test/CXX/over/over.match/over.match.best/over.ics.rank/p3-0x.cpp b/clang/test/CXX/over/over.match/over.match.best/over.ics.rank/p3-0x.cpp new file mode 100644 index 0000000..3971acc --- /dev/null +++ b/clang/test/CXX/over/over.match/over.match.best/over.ics.rank/p3-0x.cpp @@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s +namespace std_example { + int i; + int f1(); + int&& f2(); + int &g(const int &); + float &g(const int &&); + int &j = g(i); + float &k = g(f1()); + float &l = g(f2()); + + int &g2(const int &); + float &g2(int &&); + int &j2 = g2(i); + float &k2 = g2(f1()); + float &l2 = g2(f2()); + + // FIXME: We don't support ref-qualifiers yet. +#if 0 + struct A { + A& operator<<(int); + void p() &; + void p() &&; + }; + + A& operator<<(A&&, char); + A() << 1; + A() << 'c'; + A a; + a << 1; + a << 'c'; + A().p(); + a.p(); +#endif +} + +template +struct remove_reference { + typedef T type; +}; + +template +struct remove_reference { + typedef T type; +}; + +template +struct remove_reference { + typedef T type; +}; + +namespace FunctionReferencesOverloading { + template int &f(typename remove_reference::type&); + template float &f(typename remove_reference::type&&); + + void test_f(int (&func_ref)(int)) { + int &ir = f(func_ref); + } +} -- cgit v1.2.3