std::pointer_traits<Ptr>::to_address
From cppreference.com
< cpp | memory | pointer traits
| ヘッダ <memory> で定義 |
||
| static element_type* to_address( pointer p ) noexcept; |
(C++20以降) (optional member of program-defined specialization) |
|
引数であるポインタライクな(「fancy pointer」)オブジェクトと同じオブジェクトを参照する生のポインタを構築します。
この関数は、定義されている場合、pointer_to の逆であり、std::to_address によって呼び出されるカスタマイズポイントとして存在します。
[編集] パラメータ
| p | - | fancy pointer/ポインタライクなオブジェクト |
[編集] 戻り値
引数 p と同じメモリ位置を参照する、element_type* 型の生のポインタ。
[編集] 関連項目
| [static] |
引数への逆参照可能なポインターを取得する (public static member function) |
| (C++20) |
ポインタライクな型から生のポインタを取得します (関数テンプレート) |