I'm announcing my first ever open-to-the public remote seminar:
C++ Best Practices - Tooling
https://eventbrite.com/e/c-best-practices-tooling-tickets-545362252177…
Early bird tickets available! March 8, 1.5 hrs
I hope to make training available to a larger group of people but in a way that works with my interactive style!
(Godbolt) folks!
We all rely on it directly or indirectly; it's an important piece of infrastructure our C++ community relies upon.
It's a huge amount of work to maintain, extend and host $ at scale.
Thank you
Constexpr contexts do not permit undefined behaviour. This can be used to our advantage to statically test our code, ensuring that the code does not contain UB. #cpp#coding#learnprogramming
I have built a clang-tidy tool that will report on *all* implicit conversions that *might* be problematic.
It's rather thorough.
I've tested it on one of my own projects, with interesting results.
Who would like to see their project tested with it in a live C++Weekly stream?
Ok C++ Twitter!
You did an awesome job sharing all of your favorite closed source / for-pay tools last week.
That time, share your favorite OPEN SOURCE and/or FREE C++ development tools!
Let's help spread the word on these awesome tools!
💁♂️ C++ tip: While it's tempting to inline (or "= default") constructors and destructors in header files, putting them out-of-line instead often allows you to #include fewer things in these headers.
And you can still use "= default" out-of-line:
Foo::Foo() = default; 🤓👍
That seems to be a really nifty tool for taking timing measurements. Haven't run into any issues so far. Statistical analysis across multiple runs, warmup, cache-clearing, outlier detection, parameterized benchmarks, etc.
https://github.com/sharkdp/hyperfine…#programming#benchmarking
Just found out that "/std:c++latest" is enough when using the latest MSVC versions and should of course be preferred over the macros defined in <ciso646>.
I recently started to use "not" (the alternative spelling of unary operator "!") in more and more boolean expressions. I have to admit that it really does make for more readable code. However, using "not_eq" instead of "!=" doesn't appeal to me at all.
#cpp#cplusplus#coding
s = "foo bar"sv;
s1 = s.substr(4);
L = distance(s.begin(), s1.begin());
~~~
A test of what people know and what people would prefer: Is this UB? Should this be UB?
Can someone tell me if this highly intuitive behavior is intentional or a quirk of libstdc++'s ranges implementation?
Why on earth would you treat a const char* differently from a string_view here?
#cpp#cplusplus#cpp20https://godbolt.org/z/Kn6ooPzTz