How to explicit instantiate template constructor in C++?
<p>Currently I have the following class</p>

<pre><code>//AABB.h
class AABB {
   public:
    template &lt;class T&gt;
    AABB(const std::vector&lt;T&gt;&amp; verties);
    template &lt;class T&gt;
    AABB(const std::vector&lt;int&gt;&amp; indicies, const std::vector&lt;T&gt;&amp; verties);
    template &lt;class T&gt;
    AABB(const std::vector&lt;int&gt;::const_iterator begin,
         const std::vector&lt;int&gt;::const_iterator end,
         const std::vector&lt;T&gt;&amp; verties);
    AABB();
    AABB(const vec3 min, const vec3 max);
    AABB(const AABB&amp; other);

    const vec3&amp; min_p() const { return m_min; }
    const vec3&amp; max_p() const { return m_max; }

    vec3 center();
    float volume();
    float surface_area();
    bool inside(vec3 point);
    float intersect(const Ray&amp; ray);

   private:
    vec3 m_min;
    vec3 m_max;
};
</code></pre>

<p>There are three <code>AABB</code> constructors that are templated. Is there a possible way I could declare use explicit instantiation? Like the following?</p>

<pre><code>// AABB.cpp
template AABB::AABB&lt;Triangle&gt;(const idx_t, const idx_t, const vector&lt;Triangle&gt;&amp;);
</code></pre>

<p>given</p>

<pre><code>// AABB.cpp
using idx_t = std::vector&lt;int&gt;::const_iterator;
</code></pre>

<p>Currently the error from the compiler is</p>

<pre><code>/Users/DarwinSenior/Desktop/cs419/tracer2/src/AABB.cpp:7:16: error: qualified
      reference to 'AABB' is a constructor name rather than a type wherever a
      constructor can be declared
template AABB::AABB&lt;Triangle&gt;(const idx_t, const idx_t,
               ^
</code></pre>