Edward Diener wrote: [...]
Again John Maddock has used these #pragmas extensively in Regex++ to avoid data layout problems and I have used them in my libraries for the same reason, including my own components built on top of Regex++, and I have never encountered problems with them.
The issue is less clear-cut than you make it seem. What we have here is a static library (Signals) that uses several header-only libraries (shared_ptr, Function, maybe others.) To "fix" the "alignment problem", we need not only #pragmify Signals, but those other header-only libraries as well. Furthermore, we need to be careful to not miss a header-only library that is used, directly or indirectly, by Signals, or any other static library. This impacts not only Signals users; it also affects those that only use header libraries. They don't need the "fix", and some of them may legitimately object to the binary compatibility settings that the headers have inflicted on them, especially if these settings lead to slower or larger code. The alternative is simple: always build libraries and applications using the _exact same_ settings. This is a good general advice, and it also applies to settings that we cannot "fix" using the #pragma method.