Created
January 9, 2016 17:50
-
-
Save pmiddend/b4b69cb61f4481de3e45 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template<typename Type,typename Error> | |
| fcppt::either::object<Type,Error> | |
| read_to_either( | |
| std::istream &_stream, | |
| fcppt::endianness::format const _format, | |
| Error const &_error) { | |
| return | |
| fcppt::either::from_optional( | |
| fcppt::io::read<Type>(_stream,_format), | |
| [&_error]() { return _error; }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment