Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <class T>
- class VectorWriteProxy {
- public:
- _FORCE_INLINE_ T &operator[](int p_index) {
- CRASH_BAD_INDEX(p_index, ((Vector<T> *)(this))->_cowdata.size());
- return ((Vector<T> *)(this))->_cowdata.ptrw()[p_index];
- }
- };
- template <class T>
- class Vector {
- friend class VectorWriteProxy<T>;
- public:
- VectorWriteProxy<T> write;
- // ...
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement