xref: /netbsd-src/external/gpl3/gcc.old/dist/libphobos/libdruntime/gcc/attribute.d (revision 4c3eb207d36f67d31994830c0a694161fc1ca39b)
1627f7eb2Smrg // GNU D Compiler attribute support declarations.
2*4c3eb207Smrg // Copyright (C) 2013-2020 Free Software Foundation, Inc.
3627f7eb2Smrg 
4627f7eb2Smrg // GCC is free software; you can redistribute it and/or modify it under
5627f7eb2Smrg // the terms of the GNU General Public License as published by the Free
6627f7eb2Smrg // Software Foundation; either version 3, or (at your option) any later
7627f7eb2Smrg // version.
8627f7eb2Smrg 
9627f7eb2Smrg // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
10627f7eb2Smrg // WARRANTY; without even the implied warranty of MERCHANTABILITY or
11627f7eb2Smrg // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12627f7eb2Smrg // for more details.
13627f7eb2Smrg 
14627f7eb2Smrg // Under Section 7 of GPL version 3, you are granted additional
15627f7eb2Smrg // permissions described in the GCC Runtime Library Exception, version
16627f7eb2Smrg // 3.1, as published by the Free Software Foundation.
17627f7eb2Smrg 
18627f7eb2Smrg // You should have received a copy of the GNU General Public License and
19627f7eb2Smrg // a copy of the GCC Runtime Library Exception along with this program;
20627f7eb2Smrg // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
21627f7eb2Smrg // <http://www.gnu.org/licenses/>.
22627f7eb2Smrg 
23627f7eb2Smrg module gcc.attribute;
24627f7eb2Smrg 
Attribute(A...)25627f7eb2Smrg private struct Attribute(A...)
26627f7eb2Smrg {
27627f7eb2Smrg     A args;
28627f7eb2Smrg }
29627f7eb2Smrg 
30627f7eb2Smrg auto attribute(A...)(A args) if (A.length > 0 && is(A[0] == string))
31627f7eb2Smrg {
32627f7eb2Smrg     return Attribute!A(args);
33627f7eb2Smrg }
34