/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

gustedt.wordpress.com
| | quuxplusone.github.io
15.4 parsecs away

Travel
| | Someone on the cpplang Slack asks: How can I view a std::pair<T, T> as if it were a range of two Ts? That is, fill in the blank in this sample program: template<std::ranges::range R> void increment_all(R&& rg) { for (auto&& elt : rg) { elt = elt + 1; } } template<class T> auto F(std::pair<T, T>& kv) { ~~~~ } int main() { std::pair<int, int> kv = {1, 2}; increment_all(F(kv)); assert(kv.first == 2 && kv.second == 3); std::ranges::fill(F(kv), 4); assert(kv.first == 4 && kv.second == 4); }
| | qsantos.fr
11.9 parsecs away

Travel
| | This article will quickly explain the Rust types [T; N], &[T; N], &[T], Vec, &Vec with C code, and what the str, &str, String, OsString and CString add. Arrays and Slices Rust C [T; N] (array)Example: [i32; 100]Allocated on the stack T[N]Example: int[100]Allocated on the stack &[T; N] (array reference)Example: &[i32; 100]N is tracked at ... Continue reading Rust Strings for C Programmers
| | golangbot.com
13.2 parsecs away

Travel
| | A pointer is a variable that stores the memory address of another variable. This tutorial covers pointer declaration, dereferencing and various other topics with examples.
| | blog.robbowley.net
63.0 parsecs away

Travel
| [AI summary] Software developers should embrace automation tools like linters and code generators to reduce repetitive toil and focus on creative problem-solving, a practice predating the current AI hype.