I've seen this problem on multiple occasions, and it seems it occurs in both Windoes(visual studio) and Linux(gcc).
Here is a streamlined version of it:

```
class noncopyable
{
public:
    noncopyable(int n);
    ~noncopyable();
    noncopyable(const noncopyable&) = delete;
    noncopyable& operator=(const noncopyable&) = delete;
    noncopyable(noncopyable&&);
    int& setvalue();
private:
    int* number;
};

class thread_starter
{
public:
    template<typename callable>
    bool start(callable & o);
};

template<typename callable>
inline bool thread_starter::start(callable & o)
{
    std::thread t(
        [&]() {
        int i = 10;
        while (i-- > 0)
        {
            noncopyable m(i);
            std::thread child(o, std::move(m));
            child.detach();
        }
    });
    return true;
}

class callable
{
public:
    virtual void operator()(noncopyable &m);
};

void callable::operator()(noncopyable & m) { m.setvalue()++; }

int main()
{
    thread_starter ts;
    callable o;
    ts.start(o);
}

```

The code seems legit enough, but It won't compile.

In **Visual Studio**, it will give:

```
error C2893: Failed to specialize function template 'unknown-type std::invoke(_Callable &&,_Types &&...) noexcept(<expr>)'

```

in **GCC**, it will give:

```
error: no type named ‘type’ in ‘class std::result_of<callable(int)>’....

```

I think I know the problem is in some form of copying or referencing mechanism, but all the syntax seems to be proper.

What am I missing?

I've changed the example a little bit and I apologize for the confusion. I'm trying to recreate the problem as pure as possible, and I don't fully understand it myself.