Use the _Transparent concept and remove _Is_transparent by frederick-vs-ja · Pull Request #5498 · microsoft/STL (original) (raw)

#3736 added _Is_transparent and _Transparent but didn't use them.

I think it's time to use the _Transparent concept for C++20-and-later-only code. And it seems less burdensome for compilers if _Is_transparent_v is changed to be implemented with a concept. After the changes, _Is_transparent_v will be only necessary for <xtree>, so this PR moves _Is_transparent_v to that header.

<flat_map> and <flat_set> will be changed in another PR.

Theoretically, _Is_transparent would be useful in the cases where conjunction(_v) or disjunction(_v) is used. But I think there won't be such a case in MSVC STL - for new code it's probably better to use requires-clauses, and the uses of _Is_transparent_v in <xtree> seem stable enough. So I decide to remove it.