title: C++ "No matching constructor for initialization of" compiler error
body: <p>I have a class which I try to initialize but get the error "No matching constructor for initialization of 'TextureCoordinates'";</p>
  
  <p>Class which I'm trying to initialize:</p>
  
  <pre><code>class TextureCoordinates
  {
  public:
      TextureCoordinates(){};
      TextureCoordinates(Point2D&amp; origin, Dimensions2D&amp; dim);
      Point2D getOrigin() const {return origin;};
      Dimensions2D getDim() const {return dim;};
  private:
      Point2D origin;
      Dimensions2D dim;
  };
  </code></pre>
  
  <p>Line with compiler error:</p>
  
  <pre><code>TextureCoordinates result(point, Dimensions2D(width, height));
  </code></pre>
  
  <p>Definition of constructor:</p>
  
  <pre><code>TextureCoordinates::TextureCoordinates(Point2D&amp; origin, Dimensions2D&amp; dim):
  origin(origin), dim(dim) {}
  </code></pre>
  
  <p>Any ideas what I'm doing wrong?</p>