// PR c++/99318 // { dg-do compile { target c++11 } } template struct S { [[deprecated("foo")]] unsigned m_fn (char const chr) { using index_t = unsigned; return T::arr[static_cast(chr)]; // { dg-bogus "deprecated" } } }; extern unsigned int arr[]; struct R { [[deprecated("foo")]] unsigned m_fn (char const chr) { using index_t = unsigned; return arr[static_cast(chr)]; // { dg-bogus "deprecated" } } };