This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/52032] Function and class attributes should optionally take a bool parameter enabling them


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52032

Joseph Garvin <joseph.h.garvin at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WONTFIX                     |

--- Comment #2 from Joseph Garvin <joseph.h.garvin at gmail dot com> 2012-01-30 13:34:55 UTC ---
You can use template specialization to choose between two variants, but that
only solves half the problem (choosing attributes based on template
metaprogramming). The verbosity is still huge. For variable attributes it may
not be as big a deal, but for class/struct attributes changing them means
redefining the entire class/struct including all of its methods. Being able to
pass true/false to change the packed'ness of a struct would be a lot nicer than
copy and pasting a class definition, changing the name, adjusting the
specialization of each method, and then trying to remember to keep two versions
of every method in sync (or dealing with the cognitive overhead of having both
versions dispatch to another layer so that they can share their code).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]