Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I just can't find any other way to tell you this #18

Open
Orisphera opened this issue Dec 28, 2023 · 0 comments
Open

I just can't find any other way to tell you this #18

Orisphera opened this issue Dec 28, 2023 · 0 comments

Comments

@Orisphera
Copy link

Orisphera commented Dec 28, 2023

UPD: I thought this was a repo by oiyio

This is not an issue with the repository. This is an issue with something unrelated. I'm posting it here because I can't find any other way to communicate with you. If my assumptions are correct, I think you should understand it from the following:

#include <iostream>
#include <memory>

class Primer2;

class Primer1 {
    public:
        int x;
        void x_from(Primer1 x);
        void x_from(Primer2 x);
        void out();
};

class Priner2 {
    public:
        char x;
        void x_from(Primer1 x);
        void x_from(Primer2 x);
        void out();
};

int main() {
    std::cout << sizeof(Primer1) << ' ' << sizeof(Primer2) << '\n';
}

void Primer1::x_from(Primer1 x) {
    this->x = x.x;
}

void Primer1::x_from(Primer2 x) {
    this->x = x.x;
}

void Primer1::out() {
    std::cout << this->x;
}

void Primer2::x_from(Primer1 x) {
    this->x = x.x;
}

void Primer2::x_from(Primer2 x) {
    this->x = x.x;
}

void Primer2::out() {
    std::cout << this->x;
}

Compile it with g++ and see the first error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant