Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::impl::StringViewInputStream Class Reference

Encapsulates an std::istream for a StringView. More...

#include <arcane/utils/ValueConvert.h>

Public Member Functions

 StringViewInputStream (StringView v)
std::istream & stream ()

Detailed Description

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.

Constructor & Destructor Documentation

◆ StringViewInputStream()

Arcane::impl::StringViewInputStream::StringViewInputStream ( StringView v)

Definition at line 48 of file ValueConvert.cc.

Member Function Documentation

◆ stream()

std::istream & Arcane::impl::StringViewInputStream::stream ( )
inline

Definition at line 51 of file ValueConvert.h.


The documentation for this class was generated from the following files: