11548
11548
\rSec2[out.ptr.t]{Class template \tcode{out_ptr_t}}
11549
11549
11550
11550
\pnum
11551
- \tcode{out_ptr_t} is a class template used types
11551
+ \tcode{out_ptr_t} is a class template used to adapt types
11552
11552
such as smart pointers\iref{smartptr},
11553
- with functions that use output pointer parameters.
11553
+ for functions that use output pointer parameters.
11554
11554
11555
11555
\pnum
11556
11556
\begin{example}
11767
11767
\rSec2[inout.ptr.t]{Class template \tcode{inout_ptr_t}}
11768
11768
11769
11769
\pnum
11770
- \tcode{inout_ptr_t} is a class template used types
11770
+ \tcode{inout_ptr_t} is a class template used to adapt types
11771
11771
such as smart pointers\iref{smartptr},
11772
- with functions that use output pointer parameters
11772
+ for functions that use output pointer parameters
11773
11773
whose dereferenced values may first be deleted
11774
11774
before being set to another allocated value.
11775
11775
@@ -11778,20 +11778,20 @@
11778
11778
\begin{codeblock}
11779
11779
#include <memory>
11780
11780
11781
- struct StarFish* starfish_alloc ();
11782
- int starfish_populate (struct StarFish ** ps, const char * description);
11781
+ struct star_fish* star_fish_alloc ();
11782
+ int star_fish_populate (struct star_fish ** ps, const char* description);
11783
11783
11784
- struct StarFishDeleter {
11785
- void operator() (struct StarFish * c) const noexcept;
11784
+ struct star_fish_deleter {
11785
+ void operator() (struct star_fish * c) const noexcept;
11786
11786
};
11787
11787
11788
- using StarFishPtr = std::unique_ptr<StarFish, StarFishDeleter >;
11788
+ using star_fish_ptr = std::unique_ptr<star_fish, star_fish_deleter >;
11789
11789
11790
11790
int main(int, char*[]) {
11791
- StarFishPtr peach(starfish_context ());
11791
+ star_fish_ptr peach(star_fish_context ());
11792
11792
// ...
11793
11793
// used, need to re-make
11794
- int err = starfish_populate (std::inout_ptr(peach), "caring clown-fish liker");
11794
+ int err = star_fish_populate (std::inout_ptr(peach), "caring clown-fish liker");
11795
11795
return err;
11796
11796
}
11797
11797
\end{codeblock}
0 commit comments