ゲーム作りは楽しい

なんか書く

ネタ

【Git】コンフリクトしたら conflict 歌いたかった

はじめに git merge で コンフリクトしたら conflict歌いたくないですか? 色々調べているのですが、たぶんコンフリクトにフックする方法はないので 仕方ないから、コンフリクト後のコミット時にフックで妥協します。 ↑いい方法があったら教えてください。 G…

呼ばれるたびにGet Wildが流れ出すゲッター

こんなゲッターは嫌だ // 男 class Man { public: Man(float height, float weight, int32 wild) : m_height(height) , m_weight(weight) , m_wild(wild) {} // 身長取得 [[nodiscard]] float getHeight() const { return m_height; } // 体重取得 [[nodisca…

0=1の証明

本日のギャグです。 こちらのコードを見てください。 #include <cctype> #include <iostream> int main() { using namespace std; int32_t x = 0; if (x = x + 1) std::cout << "true"; } C++で以下のコードを実行したら「true」と出力されたので、 「x = x + 1」はtrueになり</iostream></cctype>…

プリパラを見すぎた人がやりがちなプログラミングミス

本日のギャグです。 よくわからないコンパイルエラーが発生 #include <iostream> #include <algorithm> int main() { int a, b; std::cin >> a >> b; int max = std::max(a, b); int relax = std::relax(a, b); std::cout << max << ' ' << relax << std::endl; } 上記プログラム</algorithm></iostream>…

niko and … に対して思う事

ショッピングモールとかを歩いていると「niko and …」をよく見る もしあなたがC++erなら、すぐに気が付いたかもしれない。 あ、これC++のコードだって int main() { auto f = [](auto... niko) constexpr { return (niko and ...); }; static_assert(f(true,…

ハッシュドポテトの作り方 C++編

はじめに 本記事はネタである。 ハッシュドポテイトうんめなー 今日もハッシュドポテイト食べたいなー よし、作ろう 1. ポテトを用意する // ポテト struct { std::uint8_t taste; // 味 std::uint8_t fragrance; // 香り std::uint8_t freshness; // 新鮮さ…