SmaRT poiNTeRs ArE tHE fUtuRE of c++

Well why don't they FUCKIGN WORK CORRECTLY.

  • 12
    Guess whose fault it was? MINE. OF COURSE.

    I needed to make the WebCrawler inherit PUBLICLY from std::enable_shared_from_this<WebCrawler>

    I am going to KILL MYSELF in minecraft.
  • 7
    This is the most characteristically C++ issue I'd seen this year. "It's technically my fault, I forgot to follow the checklist associated with calling this member function" is the quintessential C++ experience
  • 2
    Wait, if you need to publicly inherit from a class in order for a member on shared_ptr to work correctly, why isn't it defined on a specialization of shared_ptr that statically enforces this requirement?
  • 0
    Or, actually, why isn't it defined on the enable_ class itself? I mean, it already uses CRTP, that means it can define methods that are equivalent to descendant methods, no?
Add Comment