fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

9.8K
active users

#cplusplus

43 posts34 participants11 posts today

Things I wish they fixed in C/C++:

When you init an instance variable from a parameter, you often copy-paste the name of the instance variable into the parameter. This allows you to accidentally forget editing code and generate perfectly compiling but wrong code like:

class Foo {
public:
int _bar;
Foo(int bar) : _bar(_bar) {}
};

accidentally initializing a variable with itself instead of the parameter. (Thank goodness we have an "unused parameter” warning)

Does anybody use #Codacy? I've been running it as part of the CI for github.com/mattkretz/vir-simd and it's only been bothering me with false positives. Nothing helpful. Ever. What am I doing wrong? How can I recommend any tooling to less experienced C++ devs, if tools are so hard/impossible to use effectively?

improve the usage experience of std::experimental::simd (Parallelism TS 2) - mattkretz/vir-simd
GitHubGitHub - mattkretz/vir-simd: improve the usage experience of std::experimental::simd (Parallelism TS 2)improve the usage experience of std::experimental::simd (Parallelism TS 2) - mattkretz/vir-simd

So... to make concepts work in a recursive context, I just have to wrap the concept in a sfinae expression, then use mutable constexpr tricks to instantiate new types so that the compiler don't do hard error when trying to evaluate a constraint cycle?

Is there any easy way to make instantiating a concept be a soft error?