-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
13 lines (7 loc) · 1.66 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
The source files here are my solutions to the exercises in _C++ for C Programmers, Third Edition_ by Richard Pohl. Unsurprisingly, some code snippets were part of the exercises' problem statement, and so were not written by me. The rest is my own work. If you are sceptical, try reading the code (snort).
The programs were originally written with C++11 in mind, as that's what then employer had selected. I thank the poor code reviewers who read my programs that predate the ones here for their immense patience. As of 2022, I've switched employers and adopted C++17.
The files called *_test.cc will not compile without a copy of the googletest sources placed at the path GTEST_DIR:
GTEST_DIR = $(HOME)/gitsrc/googletest/googletest
googletest is available at git@github.com:google/googletest.git
As a compiler, as of 11/18/18, I'm using g++ (Debian 8.2.0-9) 8.2.0. Note that the Makefile incorporates -fsanitize=address for the default CXXFLAGS. As of 5/25/20, the first pass at all the exercises in the text is complete. As of 10/10/2020, unit tests cover over 95% of the code with the notable exception of bad allocations. I tried specifying alternate allocators as template parameters and overloading "new" but could not figure out how to make the test code get nullptr allocations while the libraries did not. gcov shows artificially low coverage numbers because it does not understand googletest DEATH tests.
As of 2022, I've replaced all necessary assertions with exceptions and removed googletest DEATH tests. Also gone are instances of raw "new", replaced by smart ptrs. With these changes, the code passes clang-tidy and valgrind and achieves 99.4% test coverage.