horribleprogram
C++
Toronto, Ontario, Canada
PLEASE READ:

(horribleprogram)


PLEASE READ:

(horribleprogram)


Claude Opus 4.7 is a terrible coder.
Claude Opus 4.7 can barely solve CRTP vtable problems




#include <cstdio>
#include <memory>

template<typename Derived>
struct Cloneable {
virtual std::unique_ptr<Derived> clone() const {
return std::make_unique<Derived>(static_cast<const Derived&>(*this));
}
virtual ~Cloneable() = default;
};

struct Animal : Cloneable<Animal> {
int legs;
explicit Animal(int l) : legs(l) {}
};

struct Dog : Animal {
int tricks;
Dog(int l, int t) : Animal(l), tricks(t) {}
};

int main() {
Dog d(4, 10);
Animal* ap = &d;
auto cloned = ap->clone();
printf("legs=%d\n", cloned->legs);
Dog* dp = dynamic_cast<Dog*>(cloned.get());
printf("dp=%p\n", (void*)dp);
return 0;
}


Ask Opus 4.7 why Dog *dp = dynamic_cast<Dog *>(cloned.get()); returns nullptr

Artwork Showcase
City
1 1
Featured Artwork Showcase
Post COVID Courtyard
1 5
Recent Activity
3,109 hrs on record
last played on Jul 30
0 hrs on record
last played on Jun 28
67 hrs on record
last played on Jun 9
Jul 7 @ 12:56pm 
-rep
contacted my little sister for malicous intent.
then left his cs2 game to go contact her.
Jul 3 @ 1:35pm 
-rep larping as cracked dev, complains about memory safety in 2026
May 14 @ 7:58pm 
+rep funny guy, quiet mike
May 6 @ 12:28pm 
+rep good life coach
Apr 1 @ 10:03pm 
W larp:steambored::steambored::steambored:
Mar 25 @ 6:51am 
LOW IQ