« first day (2814 days earlier)      last day (45 days later) » 

12:28 AM
@Dai someone sends John Wick after you
 
 
3 hours later…
3:15 AM
When developing a library it's often useful to include some debugging output, test cases and assert statements. How does this work with Git? I guess businesses usually have several branches including development and production. Maybe I'm looking at it wrong but this seems like overkill for more of a small, personal project that doesn't have releases. For small projects is it normal to have two branches, one with debugging features and the other without?
 
 
3 hours later…
5:46 AM
Is there any way to check if an iterator being derferenced is pointing to a valid location? Since std::end() returns a past-the-end location this can be an issue. Compiling with -Wall -Pedantic -fsanitize=address didn't help and the program runs without error. Does it even count as UB?
 
6:41 AM
@northerner At least in general, no. If you didn't care (at all) about efficiency, you could probably write iterators for some containers that that would support it, but it could get pretty expensive.
 
7:01 AM
Didn't the MSVC standard library have a preprocessor macro to enable validity checking of iterators?
I'm pretty sure that was one of the things that was enabled by default in some debug mode and then people were complaining about debug vs. release perf being so far apart.
 
7:13 AM
@PeterT Yes, they did some checking of some iterators.
@PeterT Yes, it was quite expensive.
 
 
3 hours later…
9:51 AM
@northerner I would not commit any of the debugging code, and just keep them in the working tree. If you want to test without the debugging code, just stash it away.
 
I would just commit the test code in a seperate directory. Even if just for backup purposes.

If you're really concerned about it not bein clean, you can push it in a seperate branch but I wouldn't bother
 

« first day (2814 days earlier)      last day (45 days later) »