The std::shared_ptr constructor isn\'t behaving as I expected:
#include
#include
void func(std::vector st
You need to use make_shared if you want to create a new object, constructed from those arguments, pointed to by a shared_ptr. shared_ptr is like a pointer to T- it needs to be constructed with a pointer to T, not a T.
Edit: Perfect forwarding is in fact not at all perfect when initializer lists are involved (which is the suck). It's not a bug in the compiler. You will have to create an rvalue of type Func manually.