Timeline for Graph coloring project in C++
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 26, 2020 at 16:16 | comment | added | Quuxplusone |
2) Huh! Today I learned that C++ apparently lets you type-pun between pointer types that differ only in const , as long as you promise not to modify the type-punned object. That's a little scary. godbolt.org/z/-pY_OD 3) Unused and untested source code is always "harm." Not only do I have to read and think about it, I might also be tempted to use it (and then find out later that it doesn't work). The smaller your codebase, the easier it is to work with.
|
|
Jan 26, 2020 at 11:26 | comment | added | Varad Mahashabde |
Comment Edit: Maybe I should add a cast to T for List<T>::Iterator
|
|
Jan 26, 2020 at 11:15 | comment | added | Varad Mahashabde |
3) Sure, maybe no one needs to access BinaryFunctor::function , but surely no harm could be incurred by leaving it there, right? Right? (2/2)
|
|
Jan 26, 2020 at 11:14 | comment | added | Varad Mahashabde |
Thanks for answering! I do agree with all that you have said (the operator!=( ~Node ~ Iterator) was embarrassing TBH), but I do have a couple of nitpicks : 1) Intended interface for Iterator is Iterator i(MyList); typeof(T) == typeof(i()) . current is private, it's just that List is a friend. 2) AddConstToType explicitly exists to allow for const& to pointer types. Link to source. (1/2)
|
|
Jan 25, 2020 at 22:03 | history | answered | Quuxplusone | CC BY-SA 4.0 |