On Jun 28, 2013, at 2:50 PM, Warren Hunt <[email protected]> wrote: > That is reasonable, we can certainly fuse them into a single file and that > will make sharing some C-layout code easier. I can do that. I personally > find (more) smaller files easier to navigate and tend to break things apart. > Of course that causes either duplication of code or re-factoring into headers.
I'd strongly prefer to avoid any unnecessary duplication here just because there are so many small levers affecting class layout, but pulling code into a CRTP (or otherwise) base in a private header wouldn't be unreasonable if the code is like 90% divergent. I am assuming here that this is not *just* C layout but is also useful for layout of fields in C++ classes (although IIRC MSVC lays out the fields separately and then drops them into the larger class as a chunk, potentially leaving spurious alignment padding after the vfptr/vbptr/bases). John. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
