Errors and bugs should be prominent. If an error can be dealt with by the client code, it's not an error.
grepability is the quality that:
| # Sphinx version: 3.1.0+ | |
| # Python version: 3.8.2 (CPython) | |
| # Docutils version: 0.16 release | |
| # Jinja2 version: 2.11.2 | |
| # Last messages: | |
| # reading sources... [ 40%] file/wide__tag_2is__same__tag__family_8h | |
| # reading sources... [ 41%] file/wide__tag_2overloads_8h | |
| # reading sources... [ 41%] file/wide__tag_8h | |
| # reading sources... [ 41%] file/width_8h | |
| # reading sources... [ 41%] file/wrap_8h |
| ===-------------------------------------------------------------------------=== | |
| clang-tidy checks profiling | |
| ===-------------------------------------------------------------------------=== | |
| Total Execution Time: 22.5880 seconds (22.5880 wall clock) | |
| ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- | |
| 1.4755 ( 8.3%) 0.3357 ( 6.8%) 1.8112 ( 8.0%) 1.8092 ( 8.0%) readability-identifier-naming | |
| 0.9903 ( 5.6%) 0.1667 ( 3.4%) 1.1570 ( 5.1%) 1.1552 ( 5.1%) bugprone-reserved-identifier | |
| 0.8855 ( 5.0%) 0.1358 ( 2.8%) 1.0213 ( 4.5%) 1.0212 ( 4.5%) cert-dcl37-c | |
| 0.8815 ( 5.0%) 0.1316 ( 2.7%) 1.0130 ( 4.5%) 1.0132 ( 4.5%) cert-dcl51-cpp |
| --- | |
| Language: Cpp | |
| # BasedOnStyle: LLVM | |
| AccessModifierOffset: -2 | |
| AlignAfterOpenBracket: AlwaysBreak | |
| AlignConsecutiveMacros: false | |
| AlignConsecutiveAssignments: false | |
| AlignConsecutiveDeclarations: false | |
| AlignEscapedNewlines: DontAlign | |
| AlignOperands: false |
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "(gdb) Launch", | |
| "type": "cppdbg", | |
| "request": "launch", |
| from time import time | |
| def primes(maximum: int): | |
| assert(maximum > 0) | |
| yield 2 | |
| non_primes = 0 | |
| non_prime_bit = 2 | |
| for non_prime_index in range(1, maximum>>1): | |
| if not non_primes & non_prime_bit: | |
| number = (non_prime_index << 1) + 1 |
| #include <algorithm> | |
| #include <cassert> | |
| #include <concepts> | |
| #include <ranges> | |
| [[nodiscard]] constexpr auto factorial(std::integral auto n) { | |
| assert(n >= 0); | |
| if (n == 0) { | |
| return 1; | |
| } |
| // How to handle C polymorphism in C++: A Working Demonstration | |
| // | |
| // This document introduces C-style polymorphism, explains the main the safety | |
| // issue it raises, and offers a technique to contain it using C++. | |
| // | |
| // Sometimes, we want to write a function that operates on an object without | |
| // knowing its type. This is called polymorphism. A good example is sorting. | |
| // We can sort a sequence of any type of object, so long as we know its order. | |
| // | |
| // The C standard library provides a quick-sort function, `qsort_r` (AKA |