Closed jensmaurer closed 9 months ago
This is increasingly common style: Present an example how to use a facility before defining the facility. We do that in [ranges] quite a bit.
@jwakely to chime in.
I think this is talking about [util.smartptr.enab], right? (the stable name in the issue title isn't in C++23)
We've done this since at least C++11 (when this example was added) and I see no compelling reason to stop. The examples give a gentler introduction than a (possibly very long) class definition.
There was no consensus for a change. Introducing a facility by showing an example use is considered reader-friendly.
Noted.
There should be a class template definition before the example.
Move class template definition before p1.