6 Comments



  1. Looks like the template argument to std::make_unique got lost. The code should read “std::make_unique” less-than “SomeStuff” greater-than.

    Reply

  2. Another case in when you use factory functions and polymorphism in general, e.g.:

    void foo(const configuration& configuration) {
      auto shape = factory::createShape(configuration);
      shape->draw();
    }
    Reply
    1. Arne Mertz

      Thanks for the comment! I had mentioned polymorphism in an earlier revision but kicked it out. Will add it again.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *