I downgraded gcc compiler for 4.9.2 to 4.4.1, as I know 4.4.1 doesn't support lambda expressions. In the following code, a lambda expression [](void*d){ dlclose(d); } is used and facing error due to lambda expression. Can anyone help how to use below code without lambda expression?
using libs_t = std::unique_ptr<void,std::function<void(void*)>>;
I replaced the above line with the below but it's also not supported by gcc 4.4.1
typedef std::unique_ptr<void,std::function<void(void*)>> libs_t ;
m_libs[ lib_name ] = libs_t ( handle, [](void*d){ dlclose(d); } );
dlclose? Why is the lambda even needed?