Conversation
4d2bd17 to
321b94c
Compare
|
I think these are great, first 2 down and working through the 3rd now, but these are definitely useful (I'm learning reflection from the 3rd). Perhaps the files could be renamed with a number indicating the order of the tutorials?
The pedant in me finds it odd to start in the middle, go down and then go up in the file view in VSCode. |
RyanJK5
left a comment
There was a problem hiding this comment.
I just gave the tutorials an in-depth look, and I think they are very good! All of the information is accurate. I left some comments, mostly regarding additional pieces of the reflection tutorial worth acknowledging. Thanks for putting these together!
|
@RyanJK5 thanks for the detailed review comments. This is exactly what’s needed for foundational material. Thanks for taking the time. |
RyanJK5
left a comment
There was a problem hiding this comment.
Looks good to me now, thanks for making those changes!
Replaces -DXYZ_PROTOCOL_BUILD_REFLECTION_TUTORIAL=ON as the way to opt into building and testing tutorials/3_reflection.cc.
| } | ||
|
|
||
| TEST(ReflectionHelpers, ClassifiesConstCorrectly) { | ||
| constexpr auto read_candidates = |
There was a problem hiding this comment.
Personal I'd perfer concept constrained auto here because being unfamilar with this function, and with no explanation of its use, I had to go to C++ ref and read the documentation to be confident I know what was happening. I think the hint is a range is enough knowledge to skip this step
| constexpr auto read_candidates = | |
| constexpr std::ranges::range auto read_candidates = |
| TEST(ReflectionHelpers, ClassifiesConstCorrectly) { | ||
| constexpr auto read_candidates = | ||
| std::define_static_array(members_named(^^Widget, "read")); | ||
| constexpr auto write_candidates = |
There was a problem hiding this comment.
Again concept-constrained auto
| constexpr auto write_candidates = | |
| constexpr std::ranges::range auto write_candidates = |
I'm not entirely sure that these tutorials are necessary.
The act of writing them was useful and perhaps they will be useful to readers of the (increasingly novel and technical) code in #95.