Skip to content

Revamp enable_if constraints in all env overloads #8033

@gonidelis

Description

@gonidelis

It has been frequently discussed throughout the PRs that add environment overloads that we make our enable_if constrains more uniform to:

a) reduce pronity to unforeseen ambiguity errors
b) make code more readable
c) avoid potential compiler oversights

Μany enable_if constraints are unnecessarily complex. The parameter type differences alone (KeyT* vs void*, concrete iterator vs size_t&) are enough for disambiguation, the is_integral_v<NumItemsT> guard is redundant in most cases.

Instances of these discussions:

#7969 (comment)
#7999 (comment)
#7908 (comment)
#7794 (comment)
#5335 (comment)
#7970 (comment)
#7907 (comment)
#7965 (comment)
#7798 (comment)
#7967 (comment)

@bernhardmgruber and @miscco have been heavily involved in this discussions in many of their reviews.

Close this PR by verifying that all enable_if in all env overloads work as expected, create no ambiguities and use no buggy traits.

This issue should be closed, after all env PRs are merged.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions