| 1 |
// { dg-additional-options -fmodules-ts } |
| 2 |
|
| 3 |
export module frob; |
| 4 |
// { dg-module-cmi !frob } |
| 5 |
|
| 6 |
int x (); |
| 7 |
export int x (); // { dg-error "conflicting exporting for declaration" } |
| 8 |
|
| 9 |
int y; |
| 10 |
export extern int y; // { dg-error "conflicting exporting for declaration" } |
| 11 |
|
| 12 |
// A typedef is not an entity so the following is OK; see [module.interface] example 4 |
| 13 |
typedef int z; |
| 14 |
export typedef int z; // { dg-bogus "conflicting exporting for declaration" } |
| 15 |
|
| 16 |
template <typename T> using w = T; |
| 17 |
export template <typename T> using w = T; // { dg-error "conflicting exporting for declaration" } |
| 18 |
|
| 19 |
template <typename T> int f (T); |
| 20 |
export template <typename T> int f (T); // { dg-error "conflicting exporting for declaration" } |
| 21 |
|
| 22 |
class A; |
| 23 |
export class A; // { dg-error "conflicting exporting for declaration" } |
| 24 |
|
| 25 |
template <typename T> struct B; |
| 26 |
export template <typename T> struct B {}; // { dg-error "conflicting exporting for declaration" } |