Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost::Interprocess - using variadic template args with managed_shared_memory::construct()
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2014-04-28 18:08:26


El 28/04/2014 12:49, james escribió:
> Hi,
>
> I'm trying to write a wrapper over some of boost::interprocess and I
> want to have a function like this:
>
> template <typename T, typename... Args>
> T* Wrapper::createStruct(const std::string& name, Args&&... args)
> {
> return m_shm->construct<T>(name.c_str())(std::forward<Args>(args)...);
> }

I can't see why the arguments are not forwarded. Could you elaborate a
compilable little test case to reproduce the problem?

Best,

Ion


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net