summaryrefslogtreecommitdiff
path: root/clang/test/CXX/over/over.oper/over.literal/p7.cpp
blob: 72411b954e1423a936ccb6a7a44da3beb145dcab (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 -std=c++11 %s -verify

constexpr int operator "" _a(const char *c) {
  return c[0];
}

static_assert(operator "" _a("foo") == 'f', "");

void puts(const char *);
static inline void operator "" _puts(const char *c) {
  puts(c);
}
void f() {
  operator "" _puts("foo");
  operator "" _puts("bar");
}