mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 09:28:21 +00:00
Add noexcept
This commit is contained in:
parent
7175bd8ae6
commit
23b8c24da4
10
fmt/format.h
10
fmt/format.h
@ -591,23 +591,23 @@ class basic_buffer {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
\rst
|
\rst
|
||||||
Increases the buffer capacity to hold at least *size* elements updating
|
Increases the buffer capacity to hold at least *capacity* elements updating
|
||||||
``ptr_`` and ``capacity_``.
|
``ptr_`` and ``capacity_``.
|
||||||
\endrst
|
\endrst
|
||||||
*/
|
*/
|
||||||
virtual void grow(std::size_t size) = 0;
|
virtual void grow(std::size_t capacity) = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~basic_buffer() {}
|
virtual ~basic_buffer() {}
|
||||||
|
|
||||||
/** Returns the size of this buffer. */
|
/** Returns the size of this buffer. */
|
||||||
std::size_t size() const { return size_; }
|
std::size_t size() const FMT_NOEXCEPT { return size_; }
|
||||||
|
|
||||||
/** Returns the capacity of this buffer. */
|
/** Returns the capacity of this buffer. */
|
||||||
std::size_t capacity() const { return capacity_; }
|
std::size_t capacity() const FMT_NOEXCEPT { return capacity_; }
|
||||||
|
|
||||||
/** Returns a pointer to the buffer data. */
|
/** Returns a pointer to the buffer data. */
|
||||||
const T *data() const { return ptr_; }
|
const T *data() const FMT_NOEXCEPT { return ptr_; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Resizes the buffer. If T is a POD type new elements may not be initialized.
|
Resizes the buffer. If T is a POD type new elements may not be initialized.
|
||||||
|
Loading…
Reference in New Issue
Block a user