std::inplace_vector<T,N>:: empty
From cppreference.net
<
cpp
|
container
|
inplace vector
C++
Containers library
|
(C++17)
|
||||
| Sequence | ||||
|
(C++11)
|
||||
|
(C++26)
|
||||
|
(C++26)
|
||||
|
(C++11)
|
||||
| Associative | ||||
| Unordered associative | ||||
|
(C++11)
|
||||
|
(C++11)
|
||||
|
(C++11)
|
||||
|
(C++11)
|
||||
| Adaptors | ||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
| Views | ||||
|
(C++20)
|
||||
|
(C++23)
|
||||
| Tables | ||||
| Iterator invalidation | ||||
| Member function table | ||||
| Non-member function table |
std::inplace_vector
| Member types | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Non-member functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
constexpr
bool
empty
(
)
const
noexcept
;
|
(C++26부터) | |
컨테이너에 요소가 없는지 확인합니다.
목차 |
반환값
true 컨테이너가 비어 있는 경우, false 그렇지 않은 경우.
복잡도
상수.
예제
이 코드 실행
#include <cassert> #include <inplace_vector> int main() { std::inplace_vector<char, 8> v; assert(v.empty()); v.push_back('_'); assert(not v.empty()); }
참고 항목
|
요소의 개수를 반환합니다
(public member function) |
|
|
(C++17)
|
컨테이너가 비어 있는지 확인합니다
(function template) |