logoalt Hacker News

stefan_last Sunday at 7:43 PM2 repliesview on HN

I'm sure thats disallowed for the C-style cast.


Replies

cpgxiiilast Sunday at 7:57 PM

Fwiw, unused-cast-to-void is a case that GCC and Clang ignore when using -Wno-old-style-cast, which is what most projects prohibiting C-style casts are going to be using (or whatever the equivalent their compiler provides).

daringrain32781last Sunday at 7:48 PM

C++17 has the [[maybe_unused]] attribute.