Debian Codegraph @

gcc/testsuite/g++.dg/template/canon-type-18.C

raw
1 // { dg-do compile { target c++11 } }
2 // { dg-options "-Wno-pedantic" }
3 template<unsigned u> struct size_c{ static constexpr unsigned value = u; };
4 template<class T> auto get_align(T t) -> size_c<alignof(t)>;
5 template<class T> auto get_align(T t) -> size_c<alignof(t)>;
6 static_assert(decltype(get_align('a'))::value == 1u, "");