| Issue |
179480
|
| Summary |
Unexpected of the Best viable function selection behavior
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
safocl
|
i have follow expample:
https://godbolt.org/z/vo1q4vdqd
with `VER 1` this results in `T constructor`, but with `VER 3` this results in `operator Variant`...
```cpp
#if VER == 1
S1 j = "";
take_by_ref(j);
take_by_rref(j);
take_by_value(j);
#endif
#if VER == 3
const S1 j = "";
take_by_ref(j);
take_by_rref(j);
take_by_value(j);
#endif
```
these options differ only in the `const` qualifier of the source object of the conversion sequence.
`S1::operator Variant<int>() const` -- is the _const_-annotation member function and can be used by either const-object or non-const-object.
Why do these code variants choose different conversion paths depending only on the constancy of the source object of the conversion sequence?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs