god::input#

Note

Declared in <god/input.hpp>

namespace input#

Functions

std::expected<std::deque<std::string>, god::error> file(const std::string &path) noexcept#

Read lines from a file into a deque of strings.

Parameters:

path – The file path to attempt reading from

Returns:

A deque of strings or an error object

std::expected<std::deque<std::string>, god::error> file(const std::filesystem::path &path) noexcept#
std::expected<std::deque<std::string>, god::error> file(const char *path) noexcept#
std::expected<std::deque<std::string>, god::error> stream(std::istream &is) noexcept#

Read lines from an input stream to deque of strings.

Parameters:

is – The input stream to attempt reading from

Returns:

A deque of strings or an error object