C++

Modern C++チャレンジ 、一章、読書メモ

Modern C++チャレンジ読書会で、C++17の問題集やっているのでRustでも解いてみた。 以下Rust実装。 impl with Rust · GitHub

xorshiftとmt19937の速度比較

C++

なんかxorshiftが、速くて、簡単で、美味いとのことなので実装してみた。 で、ついでにstd:mt19937と比較。 Google Chromeが採用した、擬似乱数生成アルゴリズム「xorshift」の数理 Xorshift - Wikipedia xorshift.cppソースコード https://github.com/muras…

friend template

C++テンプレート完全ガイド読書会 vol.9大阪参加 8.4から9.1まで読み。 #include <iostream> template <typename T> class Creator{ /* friend void appear(){ //下記main中のoneとthreeでappearが二重定義 return not not 0; }*/ friend int feed(Creator<T>*){ return not not 0; } </t></typename></iostream>…

c++のADLについて

読書会メモ ExceptionalC++ 5章 pp137..150 項目31/32 名前の自動照合とインターフェース原則 Part1/2 ref for ADL:ADL簡易解説 - Faith and Brave - C++で遊ぼう ExceptionalC++読書会vol.12大阪 ADL*1について。 c++の関数探索は、引数の属するnamespaceも…