std::inplace_vector<T,N>::empty
From cppreference.com
< cpp | container | inplace vector
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Containers library
(C++17)
(C++11)
(C++26)
(C++26)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++23)
(C++23)
(C++23)
(C++23)
(C++20)
(C++23)
Tables
std::inplace_vector
inplace_vector::empty
constexpr bool empty() const noexcept;
(since C++26)
Checks if the container has no elements.
Contents
[edit] Return value
true if the container is empty, false otherwise.
[edit] Complexity
Constant.
[edit] Example
Run this code
#include <cassert> #include <inplace_vector> int main() { std::inplace_vector <char, 8> v; assert (v.empty()); v.push_back('_'); assert (not v.empty()); }