| 1 | namespace ignore { |
| 2 | struct Dummy {}; |
| 3 | |
| 4 | template <typename T> auto auto_ret(T x) { return 0; } |
| 5 | [[gnu::abi_tag("test" )]] int with_tag() { return 0; } |
| 6 | template <typename T> [[gnu::abi_tag("test" )]] int with_tag_template() { |
| 7 | return 0; |
| 8 | } |
| 9 | |
| 10 | template <typename T> decltype(auto) decltype_auto_ret(T x) { return 0; } |
| 11 | } // namespace ignore |
| 12 | |
| 13 | template <typename T> |
| 14 | [[gnu::abi_tag("test" )]] ignore::Dummy with_tag_template_returns_ignore(T x) { |
| 15 | return {}; |
| 16 | } |
| 17 | |
| 18 | int main() { |
| 19 | auto v1 = ignore::auto_ret<int>(x: 5); |
| 20 | auto v2 = ignore::with_tag(); |
| 21 | auto v3 = ignore::decltype_auto_ret<int>(x: 5); |
| 22 | auto v4 = ignore::with_tag_template<int>(); |
| 23 | auto v5 = with_tag_template_returns_ignore<int>(x: 5); |
| 24 | } |
| 25 | |