Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::allocator<T>::address

      From cppreference.com
      <cpp‎ |memory‎ |allocator
       
       
      Memory management library
      (exposition only*)
      Allocators
      Uninitialized memory algorithms
      Constrained uninitialized memory algorithms
      Memory resources
      Uninitialized storage(until C++20)
      (until C++20*)
      (until C++20*)
      Garbage collector support(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
       
       
      (1)
      pointer address( reference x)const;
      (until C++11)
      pointer address( reference x)constnoexcept;
      (since C++11)
      (deprecated in C++17)
      (removed in C++20)
      (2)
      const_pointer address( const_reference x)const;
      (until C++11)
      const_pointer address( const_reference x)constnoexcept;
      (since C++11)
      (deprecated in C++17)
      (removed in C++20)

      Returns the actual address ofx even in presence of overloadedoperator&.

      [edit]Parameters

      x - the object to acquire address of

      [edit]Return value

      The actual address ofx.

      [edit]Defect reports

      The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

      DRApplied toBehavior as publishedCorrect behavior
      LWG 634
      (N2436)
      C++98the return value is&x
      (which is affected by overloadedoperator&)
      returns the actual address ofx
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/memory/allocator/address&oldid=163379"

      [8]ページ先頭

      ©2009-2025 Movatter.jp