• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s
2 
3 template<typename T, typename U> struct is_same {
4   static const bool value = false;
5 };
6 
7 template<typename T> struct is_same<T, T> {
8   static const bool value = true;
9 };
10 
11 struct S {
fS12   void f() { static_assert(is_same<decltype(this), S*>::value, ""); }
gS13   void g() const { static_assert(is_same<decltype(this), const S*>::value, ""); }
hS14   void h() volatile { static_assert(is_same<decltype(this), volatile S*>::value, ""); }
iS15   void i() const volatile { static_assert(is_same<decltype(this), const volatile S*>::value, ""); }
16 };
17