llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Clang considers explicit conversion in copy-list-initialization context

Open seanbaxter opened this issue 4 years ago • 2 comments

https://eel.is/c++draft/over#match.copy-1.2 3rd sentence of [over.match.copy]/1.2 indicates to consider explicit conversions in context of direct-initialization. Clang considers them also in copy-list-initialization. gcc does not.

https://godbolt.org/z/qqa14cPM7

edit: This is related to the standard defect workaround CWG2327 http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2327

seanbaxter avatar Jan 28 '22 19:01 seanbaxter

@llvm/issue-subscribers-clang-frontend

llvmbot avatar Jan 28 '22 20:01 llvmbot

This issue still exists — both EDG and MSVC behave correctly as well.

https://godbolt.org/z/qThT3Y4c5

The issue started appearing with Clang 16?

Attacker23 avatar Oct 25 '25 18:10 Attacker23