Skip to content

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

Description

@Orisphera

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions