Reject every interface member that uses a reserved name, static members included
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- devtools, documentation, testing
Hướng nghiên cứu
Start with protocol_interface_function_infos, named_member_function_infos, and the StaticInterfaceMemberWithReservedNameIsIgnored test to understand the current filtering. Review DRAFT.md's “Reserved member names” section and the rejected/ignored lists in #407, then confirm the intended rule with the issue options. Done means the selected behavior is covered by tests and the related documentation and reserved-name lists are consistent.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Follow-up to #318, from the review of #449: https://github.com/jbcoe/cc-protocol/pull/449#discussion_r4057463300
#449 rejects a non-static interface member function named allocator_type, get_allocator or swap. A static member function with one of those names is skipped before the check, like every other static:
struct I {
static void swap(I&, I&) noexcept; // accepted and ignored
};
Nothing is hidden today, because interface statics are not forwarded. The case for rejecting it anyway:
- The rule is simpler to state: an interface cannot declare a member with a reserved name.
- Removing
staticlater turns an accepted interface into a rejected one. - If interface statics are ever forwarded, the reserved name would hide the generated member silently, which is what #318 set out to stop.
The same argument covers members the check never sees. named_member_function_infos filters on is_function, so a data member, static data member, alias or nested type with a reserved name is accepted too:
struct I {
using allocator_type = int; // accepted and ignored
int swap; // accepted and ignored
};
Options:
- Reject a static member function with a reserved name. Move
has_reserved_member_nameabove theis_static_memberskip inprotocol_interface_function_infos. - Reject any member with a reserved name, whatever its kind. Walk
members_ofthe interface once, before the function filter. - Leave statics and non-function members ignored, and say so in DRAFT.md.
2 gives the rule DRAFT.md can state in one sentence. Other statics stay ignored either way (#211, #403).
To change with it: the StaticInterfaceMemberWithReservedNameIsIgnored test, the "non-static member function" wording in DRAFT.md's "Reserved member names", and the rejected/ignored lists in #407. #450 adds protocol and protocol_view to reserved_member_names; the same rule should apply to them.
- Ngôn ngữ chính
- C++
- Star
- 12
- Fork
- 4
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jbcoe/cc-protocol
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
jbcoe/cc-protocol#507 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
jbcoe/cc-protocol#455 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jbcoe/cc-protocol#407 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
jbcoe/cc-protocol#194 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
jbcoe/cc-protocol#513 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của jbcoe/cc-protocol
Issue tương tự
-
multilabel_margin_loss returns an unwritten scalar for an empty CPU batch with reduction='sum'Đang mởbot-triaged module: correctness (silent) module: cpu module: empty tensor module: loss triage review
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
stephenberry/glaze#3126 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Tests: parallel pyinstallcheck runs oversubscribe the machine through nested TBB and BLAS poolsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
CefRequestContext::ClearHttpCache crashes with a null callback, though the callback is optionalĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
chromiumembedded/cef#4376 ·
Maintainer thường phản hồi trong vòng 1 ngày