error C2248: 'Array<T>::Array' : cannot access private member declared in class 'Array<T>' when variable of certain type passed to std::async


<p>I'm not experienced with C++ and I'm trying to modify some C++ code (specifically, that of <a href="http://cs.fit.edu/~mmahoney/compression/#paq" rel="nofollow">paq8l</a>). I'm trying to pass one of their data types as a parameter through <code>std::async</code>.</p>

<pre class="lang-c prettyprint-override"><code>int testTest(SmallStationaryContextMap &amp;sscm)
{
    return 1;
}

int someOtherMethod()
{
    SmallStationaryContextMap sscm(0x20000);
    testTest(sscm); // fine
    auto future = std::async(testTest, sscm); // compiler error
}
</code></pre>

<p>I hope I'm just missing something simple, but this is giving me the error in the title. <code>error C2248: 'Array&lt;T&gt;::Array' : cannot access private member declared in class 'Array&lt;T&gt;'</code></p>

<p>SmallStationaryContextMap:</p>

<pre class="lang-c prettyprint-override"><code>class SmallStationaryContextMap {
    Array&lt;U16&gt; t;
    int cxt;
    U16 *cp;
public:
    SmallStationaryContextMap(int m): t(m/2), cxt(0) {
        assert((m/2&amp;m/2-1)==0); // power of 2?
        for (int i=0; i&lt;t.size(); ++i)
        t[i]=32768;
        cp=&amp;t[0];
    }
    void set(U32 cx) {
        cxt=cx*256&amp;t.size()-256;
    }
    void mix(Mixer&amp; m, int rate=7) {
        *cp += (y&lt;&lt;16)-*cp+(1&lt;&lt;rate-1) &gt;&gt; rate;
        cp=&amp;t[cxt+c0];
        m.add(stretch(*cp&gt;&gt;4));
    }
};
</code></pre>

<p>And Array:</p>

<pre class="lang-c prettyprint-override"><code>template &lt;class T, int ALIGN=0&gt; class Array {
private:
    int n;     // user size
    int reserved;  // actual size
    char *ptr; // allocated memory, zeroed
    T* data;   // start of n elements of aligned data
    void create(int i);  // create with size i
public:
    explicit Array(int i=0) {create(i);}
    ~Array();
    T&amp; operator[](int i) {
        return data[i];
    }
    const T&amp; operator[](int i) const {
        return data[i];
    }
    int size() const {return n;}
    void resize(int i);  // change size to i
    void pop_back() {if (n&gt;0) --n;}  // decrement size
    void push_back(const T&amp; x);  // increment size, append x
private:
    Array(const Array&amp;);  // no copy or assignment
    Array&amp; operator=(const Array&amp;);
};
</code></pre>
