mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
This reverts commit bf6bb800c4.
This commit is contained in:
@@ -7,14 +7,19 @@
|
||||
|
||||
namespace Carbon {
|
||||
|
||||
template <class T>
|
||||
struct Stack;
|
||||
|
||||
template <class T>
|
||||
struct Cons {
|
||||
friend struct Stack<T>;
|
||||
|
||||
private:
|
||||
Cons(T e, Cons* n) : curr(e), next(n) {}
|
||||
|
||||
const T curr;
|
||||
Cons* const next;
|
||||
|
||||
private:
|
||||
// Cons cells are part of a "persistent data structure" and are thus
|
||||
// immutable.
|
||||
Cons& operator=(const Cons&) = delete;
|
||||
|
||||
Reference in New Issue
Block a user