mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-11-29 01:03:45 +00:00
39 lines
957 B
ReStructuredText
39 lines
957 B
ReStructuredText
.. _sprout-string-char_traits-eof:
|
|
###############################################################################
|
|
eof
|
|
###############################################################################
|
|
|
|
Interface
|
|
========================================
|
|
.. sourcecode:: c++
|
|
|
|
static SPROUT_CONSTEXPR int_type eof() SPROUT_NOEXCEPT;
|
|
|
|
Returns
|
|
========================================
|
|
|
|
| Equivalent to ``std::char_traits<Char>::eof()``.
|
|
|
|
Examples
|
|
========================================
|
|
.. sourcecode:: c++
|
|
|
|
#include <sprout/string.hpp>
|
|
#include <cstdio>
|
|
using namespace sprout;
|
|
|
|
SPROUT_STATIC_CONSTEXPR char x = char_traits<char>::eof();
|
|
static_assert(x == EOF, "x is equivalent to EOF.");
|
|
|
|
Complexity
|
|
========================================
|
|
|
|
| constant.
|
|
| Recursive function invocations in *O(1)* (constant) depth.
|
|
|
|
Header
|
|
========================================
|
|
|
|
| ``sprout/string/char_traits.hpp``
|
|
| Convenience header: ``sprout/string.hpp``
|
|
|