Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::align_val_t

      From cppreference.com
      <cpp‎ |memory‎ |new
       
       
      Utilities library
       
      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)
       
       
      Defined in header<new>
      enumclass align_val_t:std::size_t{};
      (since C++17)

      Bothnew-expression anddelete-expression, when used with objects whose alignment requirement is greater than__STDCPP_DEFAULT_NEW_ALIGNMENT__, pass that alignment requirement as an argument of typestd::align_val_t to the selected allocation/deallocation function.

      [edit]Notes

      Alignment (as obtained byalignof) has the typestd::size_t, but placement forms of allocation and deallocation functions that takestd::size_t as an additional parameter are already in use, so this type is used instead.

      Feature-test macroValueStdFeature
      __cpp_aligned_new201606L(C++17)Dynamic memory allocation for over-aligned data

      [edit]See also

      allocation functions
      (function)[edit]
      deallocation functions
      (function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/memory/new/align_val_t&oldid=156063"

      [8]ページ先頭

      ©2009-2025 Movatter.jp