Skip to content

Use mpl::conditional_t instead of std::conditional_t internally - #1603

Open
trueqbit wants to merge 3 commits into
refactor/mpl-folderfrom
refactor/mpl-conditional-sweep
Open

trueqbit wants to merge 3 commits into
refactor/mpl-folderfrom
refactor/mpl-conditional-sweep

Conversation

@trueqbit

Copy link
Copy Markdown
Collaborator

Stacked on #1602.

mpl::conditional_t memoizes only two class template instances (mpl::conditional<true> and mpl::conditional<false>) and selects through a nested alias template, whereas each std::conditional_t use instantiates a std::conditional specialization for its argument triple.

  • The internal uses in ast/builtin_function.h, result_set/column_result.h, schema/db_objects.h and schema/virtual_table.h switch to mpl::conditional_t; these headers now include mpl/conditional.h.
  • The include comments no longer list std::conditional where it is not used anymore (also tuple_filter.h, which had already switched).
  • The public builtin functions in builtin/functions/core.h keep std::conditional_t: it appears in their declared return types and thus in consumer diagnostics, and the memoization gain there is negligible.

🤖 Generated with Claude Code

Converts the internal uses in builtin_function.h, column_result.h,
db_objects.h and virtual_table.h, which now include mpl/conditional.h, and
drops std::conditional from the include comments that no longer use it.
The public builtin functions in builtin/functions/core.h keep
std::conditional_t, which their declared return types show in diagnostics.

Co-Authored-By: Claude Opus 5

This branch has not been deployed

No deployments
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.

1 participant