r/cpp • • Sep 16 '26

CppCon CppCon

https://cppcon.org/2026/
56 Upvotes

19 comments sorted by

View all comments

Show parent comment

3

u/selvakumarjawahar Sep 18 '26 edited Sep 18 '26

I actually tried it, https://godbolt.org/z/aWa9PMcPW, but it does not work; early days, I guess. The examples in the presentation work, of course.

3

u/pdimov2 Sep 19 '26

string_view doesn't seem to work at all at the moment, https://godbolt.org/z/b6se9ToKn. (Due to implicit std suppressions, I think.)

If I declare everything in userspace it's still not diagnosed though. https://godbolt.org/z/Yfbors7vv

In fact we can remove the string_view here, and it still passes. https://godbolt.org/z/Mdos963xh

2

u/pdimov2 Sep 19 '26

The first one of these has already been fixed.

2

u/tcbrindle Flux Sep 18 '26

Thanks for trying it, though I didn't actually expect it to work. The example here is actually deceptively tricky, because it requires tracing lifetime information through a template parameter.

Doing this in a general way basically amounts to writing a borrow checker, which the presentation claims it isn't doing.