This patch enables function objects as integrands in numerical integration routines. Also it adds apply_functor templates to transform vectors and matrices with function objects.
Changes commited in rev 1929. Please update and retest.
Done. Gtests passed with ACML and FFTW3 on MSVC. No regression found with old tests.
As a side note - static library is the only option for ITPP on windows. MSVC linker exports nothing by default, so in order to support shared builds on windows one will have to either add _decl_spec(dll_import) for every class/function to import or cheat with dumpbin /LINKERMEMBER as described here - (http://stackoverflow.com/questions/225432/export-all-symbols-when-creating-a-dll). So, I guess it would be better to disable shared builds on windows by default:
option(SHARED_LIB "Building IT++ as shared library" off)
option(SHARED_LIB "Building IT++ as shared library" on)
Actually this is done on purpose because I am hoping to solve this issue soon. We need to export every class/function with a compiler variable, say ITPP_EXPORT and to include an export.h header. I am able to take care of generating the export.h header, but I need some help for exporting then testing the shared library on Windows. A feature request is already opened.
That will be great. I'll be glad to help with it.
PS explicit template instantiations can be tricky too. Sometimes microsoft compiler optimizes away imported stuff.
I have just committed the code needed to handle symbols import/export. Please see feature request #84.
Indeed, templates could be an issue when building a shared library with MS Visual Studio C++.