source:
liblaziness/r.io.h
@
26
| Last change on this file since 26 was 4, checked in by artyom, 13 years ago | |
|---|---|
| File size: 392 bytes | |
| Rev | Line | |
|---|---|---|
| [4] | 1 | #ifndef __R_IO_H__ |
| 2 | #define __R_IO_H__ | |
| 3 | #include "r.h" | |
| 4 | #include <iostream> | |
| 5 | ||
| 6 | template<typename T> | |
| 7 | std::ostream& operator << (std::ostream& out, R<T>& val) | |
| 8 | { | |
| 9 | return out << *val; | |
| 10 | } | |
| 11 | ||
| 12 | template<typename T> | |
| 13 | std::ostream& operator << (std::ostream& out, R<T>&& val) | |
| 14 | { | |
| 15 | return out << *val; | |
| 16 | } | |
| 17 | ||
| 18 | template<typename T> | |
| 19 | std::istream& operator >> (std::istream& in, R<T>& val) | |
| 20 | { | |
| 21 | return in >> *val; | |
| 22 | } | |
| 23 | ||
| 24 | #endif |
Note: See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](/trac/tamop/chrome/site/your_project_logo.png)