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 akchilov2.cpp #217

Merged
merged 3 commits into from
Dec 30, 2023
Merged

Create akchilov2.cpp #217

merged 3 commits into from
Dec 30, 2023

Conversation

AzrBrk
Copy link
Contributor

@AzrBrk AzrBrk commented Dec 30, 2023

限制太多了,不知道能不能满足要求

限制太多了,不知道能不能满足要求
//msvc下可以编译
//这个程序的原理是用std::is_constructible猜测类的成员类型
//然后使用偏移量来访问类的数据成员
namespace my_utilities
Copy link
Owner

Choose a reason for hiding this comment

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

根据你的注释,我有理由怀疑你这有 UB


//需要C++20以上
//msvc下可以编译
//这个程序的原理是用std::is_constructible猜测类的成员类型
Copy link
Owner

Choose a reason for hiding this comment

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

描述一下依赖了 msvc 的什么,只能 msvc 编译。
是它的扩展?还是abi,等等。
以及是否 ub。

修复在GCC和clang下模板匹配的问题,但是在GCC下运行结果错误,应该是GCC的结构体用了和不一样的存储结构
@Mq-b Mq-b merged commit d985491 into Mq-b:main Dec 30, 2023
1 check passed
rsp4jack pushed a commit that referenced this pull request Jan 14, 2024
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

Successfully merging this pull request may close these issues.

2 participants