blob: 4a7c24b9944ebbb99743a5ede594174075066365 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t
// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t -verify %s
#ifndef HEADER_INCLUDED
#define HEADER_INCLUDED
using size_t = decltype(sizeof(int));
int operator"" _foo(const char *p, size_t);
template<typename T> auto f(T t) -> decltype(t + ""_foo) { return 0; } // expected-note {{substitution failure}}
#else
int j = ""_foo;
int k = f(0);
int *l = f(&k);
struct S {};
int m = f(S()); // expected-error {{no matching}}
#endif
|