std::pointer_traits<Ptr>:: pointer_to
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
|
pointer_traits::pointer_to
(C++11)
|
||||
|
(C++20)
(optional)
|
|
定義先ヘッダ
<memory>
|
||
|
static
pointer
pointer_to ( element_type & r ) ; |
(1) |
(C++11以降)
(
pointer_traits<Ptr>
特殊化のメンバ)
|
| (2) | ||
|
static
pointer
pointer_to ( element_type & r ) noexcept ; |
(C++11以降)
(C++20まで) (
pointer_traits<T*>
特殊化のメンバ)
|
|
|
static
constexpr
pointer
pointer_to ( element_type & r ) noexcept ; |
(C++20以降)
(
pointer_traits<T*>
特殊化のメンバ)
|
|
引数に対して逆参照可能なポインタまたはポインタ風オブジェクト( "fancy pointer" )を構築します。
pointer_to
を提供しない場合、この関数のインスタンス化はコンパイル時エラーとなります。
目次 |
パラメータ
| r | - |
element_type
&
型のオブジェクトへの参照。ただし、element_typeが
void
の場合、
r
の型は未規定
|
戻り値
間接参照可能なポインタで、 r を指し、型は pointer_traits <> :: pointer です。
例外
注記
この関数の Boost.Intrusiveライブラリバージョン は、 pointer ( std:: addressof ( r ) ) を返します( Ptr :: pointer_to が存在しない場合)。
関連項目
|
(C++11)
|
オブジェクトの実際のアドレスを取得する(
&
演算子がオーバーロードされている場合でも)
(関数テンプレート) |
|
(until C++20)
|
オブジェクトのアドレスを取得する(
operator
&
がオーバーロードされている場合でも)
(
std::allocator<T>
の公開メンバ関数)
|
|
[static]
(C++20)
(optional)
|
ファンシーポインタから生ポインタを取得する(
pointer_to
の逆操作)
(公開静的メンバ関数) |
|
(C++20)
|
ポインタライクな型から生ポインタを取得する
(関数テンプレート) |