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

Create akchilov3消灭一切打表式反射.cpp #251

Merged
merged 6 commits into from
Feb 1, 2024
Merged

Conversation

AzrBrk
Copy link
Contributor

@AzrBrk AzrBrk commented Jan 21, 2024

@Matrix-A
Copy link
Contributor

Matrix-A commented Jan 21, 2024

struct X
 {
    char cc{'k'};
    int a{10};
    char c{'l'};
    char e{'3'};
    double b{2.33};
 };

使用以上结构体,偏移求解错误

https://gcc.godbolt.org/z/cqEW43Evz

偏移求解参考akchilov2.cpp:108

原来是一个人啊

人不能两次踏进同一条河流。 -- 赫拉克利特

@Mq-b
Copy link
Owner

Mq-b commented Jan 21, 2024

你提交pr能不能不要搞这么抽象的名字,我看到都不知道是啥,你总得说明:

第 N 题 name

这样的 commit 丑的要死

@Mq-b Mq-b added category: homework 卢瑟作业 luse issue/pr/discussion 不够好 labels Jan 21, 2024
@AzrBrk
Copy link
Contributor Author

AzrBrk commented Jan 21, 2024

等下,改改

@Mq-b Mq-b self-assigned this Jan 21, 2024
Copy link
Owner

@Mq-b Mq-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改完再说

@AzrBrk
Copy link
Contributor Author

AzrBrk commented Jan 21, 2024

https://gcc.godbolt.org/z/b63qv93xb 测试了这个,应该是没有啥问题了吧。。。
另外msvc应该是能build的啊:https://gcc.godbolt.org/z/P6E5e6PW6

@Matrix-A
Copy link
Contributor

struct X
{
    char cc{ 'k' };
    int a{ 10 };
    char c{ 'l' };
    short r{123};
    char e{ 'u' };
    int ac{ 19 };
    double b{ 2.33 };
    double bbg{ 4.55 };
};

error

https://gcc.godbolt.org/z/jYYsd3GbW

同步修改编译期版,修复位移越出对齐宽度时未重置偏移值和偏移层的问题
@geihob
Copy link
Collaborator

geihob commented Jan 21, 2024

文件名用了空格(默认空格当路径分隔符

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你为什么要在文件名里特地强调“第十题”?文件名直接叫 akchilov3.cpp 就行。

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你为什么要在文件名里特地强调“第十题”?文件名直接叫 akchilov3.cpp 就行。

他阅读理解太夸张了,我让他 commit 和 pr 写第几题,他把文件名改了。

@rsp4jack
Copy link
Collaborator

@AzrBrk 你修改好了就要自己 request for review。

@rsp4jack
Copy link
Collaborator

@Matrix-A #251 (comment) 的这个问题是否还存在?review 一下。

@Matrix-A
Copy link
Contributor

Matrix-A commented Jan 24, 2024

@Matrix-A #251 (comment) 的这个问题是否还存在?review 一下。

还是存在的

Copy link
Collaborator

@rsp4jack rsp4jack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mq-b
Copy link
Owner

Mq-b commented Jan 25, 2024

问题在于,你这个 pr 的名字,还是不明确啊

@Mq-b
Copy link
Owner

Mq-b commented Jan 25, 2024

还有四个 commit 的信息,瞎写

@rsp4jack
Copy link
Collaborator

rsp4jack commented Jan 25, 2024

还有四个 commit 的信息,瞎写

@Mq-b 不喜欢 PR 的 commit 信息可以 Squash and Merge。

@AzrBrk
Copy link
Contributor Author

AzrBrk commented Jan 31, 2024

还有四个 commit 的信息,瞎写

@Mq-b 不喜欢 PR 的 commit 信息可以 Squash and Merge。

更新:
https://gcc.godbolt.org/z/Y1e193Mcr
https://gcc.godbolt.org/z/91Peafj33

@Mq-b
Copy link
Owner

Mq-b commented Jan 31, 2024

还有四个 commit 的信息,瞎写

@Mq-b 不喜欢 PR 的 commit 信息可以 Squash and Merge。

更新: https://gcc.godbolt.org/z/Y1e193Mcr https://gcc.godbolt.org/z/91Peafj33

好复杂(

@AzrBrk
Copy link
Contributor Author

AzrBrk commented Jan 31, 2024

还有四个 commit 的信息,瞎写

@Mq-b 不喜欢 PR 的 commit 信息可以 Squash and Merge。

更新: https://gcc.godbolt.org/z/Y1e193Mcr https://gcc.godbolt.org/z/91Peafj33

好复杂(

已知问题:编译时运行版本无法推算聚合类内部有聚合类成员的情况,目前我不知道如何解决, std::is_constructible_v会为false,但是可以有非聚合类的结构体成员

@rsp4jack
Copy link
Collaborator

rsp4jack commented Feb 1, 2024

已知问题:编译时运行版本无法推算聚合类内部有聚合类成员的情况,目前我不知道如何解决

那就可以了。另外要记得 request for review。@AzrBrk

@rsp4jack rsp4jack merged commit 3f315b0 into Mq-b:main Feb 1, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: homework 卢瑟作业 luse issue/pr/discussion 不够好
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants