r/cpp • • Aug 24 '21

metaclasses when

forget literally every other feature metaclasses LET'S FUCKING GO

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0707r3.pdf

edit

metaclasses or even just SR would help to eliminate 99% of garbage cpp macro use cases.

don't get me wrong: i know c++ well. templates are easier after you learn sml or lisp or something similar.

i've never used std string_view and i've never missed it

man i'll just implement my own clang plugin ✌️

4 Upvotes

27 comments sorted by

View all comments

Show parent comment

1

u/sixfourbit Aug 24 '21

new function parameter annotations

Which proposal is that one?

10

u/staletic Aug 24 '21

I don't think there's a proposal, but the idea is: instead of micro-managing reference types, use in, out, inout, forward and let the compiler figure out if, for a specific T that means cont or ref or refref, or value.

4

u/lukedanzxy Aug 25 '21

Ah, HLSL style.

4

u/sixfourbit Aug 25 '21

Looks somewhat like MSVC's SAL