Skip to content

Commit 06061f3

Browse files
committed
⚔️ Updated some comments.
Those are anecdotes about how I discovered things.
1 parent 8eb4143 commit 06061f3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cpp/modern.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ int main() {
3333

3434
// This should be UB.
3535
function<int(void)> y{nullptr};
36+
3637
{
3738
auto x{make_shared<int>(4)};
3839
y = f(x);
3940
}
41+
4042
cout << y() << endl;
4143

4244
// This is uninitialized.

python/src/variance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ def attack_and_defend(self) -> None:
462462

463463
def codependent_generic():
464464
# Using generic to solve this.
465-
# I think I noticed this is possible by reading the source code of spark.
465+
# I think I noticed this is possible by first thinking how `typing.Self` is implemented,
466+
# then expanded horizons by reading the source code of spark.
466467
_B = TypeVar("_B", bound="B")
467468
_A = TypeVar("_A", bound="A")
468469

0 commit comments

Comments
 (0)