33 template <
typename... Args>
35 static void raise(Args&&... args)
62 void attach(lt_dlhandle h);
66 T
sym(
const std::string& s)
69 if (
auto res = lt_dlsym(handle, s.c_str()))
70 return reinterpret_cast<T
>(
res);
72 raise(
"failed to dlsym ", s);
xlt_handle open(const std::string &s)
ATTRIBUTE_NORETURN void raise(Args &&... args)
Raise a runtime_error with the concatenation of args as message.
lt_dlhandle dlopen_(const file_library::path &s) const
Does not use the search path. Can return 0.
lt_dlhandle handle
The handle.
const file_library & path() const noexcept
xlt_handle xlt_openext(const std::string &s, bool global)
Wrapper around lt_dlopenext.
boost::filesystem::path path
T sym(const std::string &s)
Wrapper around lt_dlsym that exits on failures.
Manage sets of inclusion paths.
xlt_advise & global(bool global)