|
You are here |
usingstdcpp.org | ||
| | | | |
sdowney.org
|
|
| | | | | A Possible Technique constexpr bool g(int lhs, int rhs) { auto& op = partial_eq; return op.ne(lhs, rhs); } Compiler Explorer with Supporting Code A trait is defined as a template var... | |
| | | | |
www.foonathan.net
|
|
| | | | | In my previous blog post, weve discussed the static constexpr std::integral_constant idiom to specify the size of a range at compile-time. Unlike the standard, our (think-cells) ranges library at think-cell already supports compile-time sizes natively, so I was eager to try the idiom there and see how it works out in practice. namespace tc { template constexpr auto size(Rng&& rng); // runtime-size of a range, like std::ranges::size template requires tc::has_constexpr_size constexpr auto constexpr_size = ... | |
| | | | |
quuxplusone.github.io
|
|
| | | | | In C++, there's often multiple ways to refer to the same entity: aliases, inherited names, injected names, names that differ in qualification... Usually, if an entity has multiple names, which one you use won't matter: you can use any of those synonymous names and the compiler won't care. But each entity always has a uniquely "truest" name, privileged above all the other ways to refer to it. In some situations, in order to do a thing with an entity, you do actually need to call it by its "true name." Here is a (non-exhaustive) list of such situations. | |
| | | | |
blog.jayfields.com
|
|
| | | Some people ask if Test Driven Development (TDD) is what caused Ruby to become popular. Other people smarter than me claim that TDD is in fa... | ||