Encapsulates an std::istream for a StringView. More...
#include <arcane/utils/ValueConvert.h>
Public Member Functions | |
| StringViewInputStream (StringView v) | |
| std::istream & | stream () |
Encapsulates an std::istream for a StringView.
Currently (C++20) std::istringstream uses an std::string for input, which requires an instance of this type and thus a potential allocation. This class serves to avoid this by directly using the memory pointed to by the instance of StringView passed in the constructor. The latter must remain valid throughout the use of this class.
Definition at line 42 of file ValueConvert.h.
| Arcane::impl::StringViewInputStream::StringViewInputStream | ( | StringView | v | ) |
Definition at line 48 of file ValueConvert.cc.
|
inline |
Definition at line 51 of file ValueConvert.h.