Skip to content
Snippets Groups Projects
Commit 013539cd authored by Rafael Espindola's avatar Rafael Espindola
Browse files

Add a test from pr14898.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172283 91177308-0d34-0410-b5e6-96231b3b80d8
parent c3cd6f7a
No related branches found
No related tags found
No related merge requests found
...@@ -48,3 +48,26 @@ namespace test5 { ...@@ -48,3 +48,26 @@ namespace test5 {
void g(); void g();
} }
} }
// pr14898
namespace test6 {
template <class _Rp>
class __attribute__ ((__visibility__("default"))) shared_future;
template <class _Rp>
class future {
template <class> friend class shared_future;
shared_future<_Rp> share();
};
template <class _Rp> future<_Rp>
get_future();
template <class _Rp>
struct shared_future<_Rp&> {
shared_future(future<_Rp&>&& __f); // expected-warning {{rvalue references are a C++11 extension}}
};
void f() {
typedef int T;
get_future<int>();
typedef int& U;
shared_future<int&> f1 = get_future<int&>();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment