Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename IteratorType>
- inline bool MyClass::readRawData(
- const IteratorType& first,
- const IteratorType& last,
- typename std::iterator_traits<IteratorType>::iterator_category* = nullptr
- )
- {
- _readStream.read(reinterpret_cast<char*>(&*first), (last-first)*sizeof(*first));
- return _readStream.good();
- }
- assert(&*last - &*first == last - first &&
- "Iterators must represent a contiguous memory region");
- typename std::iterator_traits<IteratorType>::iterator_category* = nullptr
- template<typename T>
- bool readRawData(T* first, T* last);
Add Comment
Please, Sign In to add comment