Recognizing aggregates


I've got a problem. I've just finished a partial implementation of list-initialization of non-aggregates, and now several test cases fail. These test cases just test whether specific types are aggregates, but to do so, they attempt to use list-initialization on them. Now that list-initialization is possible for non-aggregates, these tests no longer work. Because these tests want to test the C++11 definition of aggregates, they have to run in C++11 mode.

Is there an alternative to list-initialization for detecting aggregates? There is no type trait, and while I could easily implement one, doing so just for some tests seems like massive overkill.


I don't see why list-initialization is insufficient: if a type isn't
an aggregate, it will start looking for constructors, and you can
easily ensure no constructor matches.


I had hoped for something prettier, but I suppose this will do.