std::allocator<T>:: address
From cppreference.net
C++
Memory management library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::allocator
| Member functions | ||||
|
allocator::address
(until C++20)
|
||||
|
(C++23)
|
||||
|
(until C++20)
|
||||
|
(until C++20)
|
||||
|
(until C++20)
|
||||
| Non-member functions | ||||
|
(until C++20)
|
| (1) | ||
|
pointer address
(
reference x
)
const
;
|
(C++11まで) | |
|
pointer address
(
reference x
)
const
noexcept
;
|
(C++11から)
(C++17で非推奨) (C++20で削除) |
|
| (2) | ||
|
const_pointer address
(
const_reference x
)
const
;
|
(C++11まで) | |
|
const_pointer address
(
const_reference x
)
const
noexcept
;
|
(C++11から)
(C++17で非推奨) (C++20で削除) |
|
オーバーロードされた operator & が存在する場合でも、 x の実際のアドレスを返します。
パラメータ
| x | - | アドレスを取得するオブジェクト |
戻り値
x の実際のアドレス。
欠陥報告
以下の動作変更の欠陥報告書は、以前に公開されたC++規格に対して遡及的に適用されました。
| DR | 適用対象 | 公開時の動作 | 正しい動作 |
|---|---|---|---|
|
LWG 634
( N2436 ) |
C++98 |
戻り値は
&
x
(これはオーバーロードされた operator & の影響を受ける) |
x の実際のアドレスを返す |