I am trying to import a symbol which has std::span<float> as an argument with boost::dll::experimental::smart_library. I am using gcc 14.2.0 and my exported function is:
void compute_kernel_cpp(std::span<float> data);
When I try to import it via
boost::dll::experimental::smart_library library("mylib.so");
boost::dll::experimental::import_mangled<void(std::span<float>)>(library, "compute_kernel_cpp");
it is not finding the symbol. The reason is that it searches for compute_kernel_cpp(std::span<float>) (which is obtained via boost::typeindex::ctti_type_index::type_id<std::span<float>>()), but the demangled symbol in the .so file is called "compute_kernel_cpp(std::span<float, 18446744073709551615ul>)". It works if I explicitly specify a non dynamic extent to span, e.g. std::span<float, 2>, but it seems the std::dynamic_extent is getting lost somewhere.
Is there a way to work around this issue?
I am trying to import a symbol which has
std::span<float>as an argument withboost::dll::experimental::smart_library. I am usinggcc14.2.0 and my exported function is:When I try to import it via
it is not finding the symbol. The reason is that it searches for
compute_kernel_cpp(std::span<float>)(which is obtained viaboost::typeindex::ctti_type_index::type_id<std::span<float>>()), but the demangled symbol in the.sofile is called"compute_kernel_cpp(std::span<float, 18446744073709551615ul>)". It works if I explicitly specify a non dynamic extent to span, e.g.std::span<float, 2>, but it seems thestd::dynamic_extentis getting lost somewhere.Is there a way to work around this issue?