Re: [eigen] MSVC inlining - just FYI

[ Thread Index | Date Index | More Archives ]

On Thu, Dec 17, 2009 at 3:15 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:

How about adding this MSVC warning to DisableMSVCWarnings.h at least
by default; if you want you can add a preprocessor option to keep it
and a CMake option to enable that in the unit tests.

We could do that but it will also disable potential cases in which we might actually be interested. An alternative would be to identify the functions in question and add another specialized inlining macro that falls back to a simple 'inline' for MSVC and keeps the strong inlining for other compilers. Thus, we would preserve the warnings we are really interested in and silence the compiler related ones. Its a bit cumbersome but that is probably a good thing to do.

Just as an addition, since Gael asked. Declaring the destructors as "inline" and with "throw()" does not help at all. Also making the destructor "quasi-trivial" by removing the deletion and providing a destructor as

inline ~UnwindableTemplate() throw() {}

does not change anything.. Only when it is completely removed the function gets inlined.

- Hauke

Mail converted by MHonArc 2.6.19+