Skip to content

Diagnostics clean-up#34

Open
mingxwa wants to merge 2 commits intongcpp:mainfrom
mingxwa:user/mingxwa/clean-up-diagnostics
Open

Diagnostics clean-up#34
mingxwa wants to merge 2 commits intongcpp:mainfrom
mingxwa:user/mingxwa/clean-up-diagnostics

Conversation

@mingxwa
Copy link
Copy Markdown
Collaborator

@mingxwa mingxwa commented May 4, 2026

Changes

  • Since we should always generate a hard error when entering the else branch of if constexpr (proxiable<P, F>), the returned bool doesn't make any difference. Removed a bunch of redundant verdict variables.
  • Renamed details::facade_traits::diagnose_proxiable() into diagnose_proxiable_noreturn().
  • Inlined details::refl_traits for simplicity and reduced diagnostic call stack for reflections.
  • Renamed details::refl_meta into reflection_meta to avoid name collision after simplicity.

As manually tested, the diagnostics work as expected. No functional changes.

Comment thread include/proxy/v4/proxy.h
@@ -400,13 +400,10 @@ template <class O>
concept extended_overload = overload_traits<O>::applicable ||
overload_substitution_traits<O>::applicable;
template <class P, class F, bool IsDirect, class D, class O>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is class F still needed?

Comment thread include/proxy/v4/proxy.h
@@ -543,28 +531,11 @@ consteval bool is_reflector_well_formed() {
return false;
}
template <class P, class F, bool IsDirect, class R>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants