This file contains 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
#include <iostream> | |
template<typename T> | |
class Pointer{ | |
private: | |
T* ptr_; | |
public: | |
Pointer(T* ptr): ptr_(ptr) {} | |
operator T*() const { | |
return ptr_; |
This file contains 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
#include <iostream> | |
#include <vector> | |
#define debug(statement) statement | |
// #define debug(statement) | |
// Above one for release use | |
/* Declarations */ | |
class GCObject; |
This file contains 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
class Stream { | |
constructor(content) { | |
this._content = content; | |
} | |
static from(arr) { | |
if (!arr[Symbol.iterator]) { | |
arr = Array.from(arr); | |
} | |
return new ArrayStream(arr); | |
} |
NewerOlder