absl::any 분석
absl::any — 임의 타입을 담는 type-erased 컨테이너. variant와 언제 어떻게 다른가.
Tech articles, book reviews, and presentations.
페이지 6 / 73
absl::any — 임의 타입을 담는 type-erased 컨테이너. variant와 언제 어떻게 다른가.
absl::Span — 연속 메모리의 non-owning view. std::span의 친척이자 더 일찍 도착한 polyfill.
absl::variant — std::variant의 polyfill. 타입-안전 union과 visitor 패턴.
absl::optional — std::optional이 도착하기 전 시기의 polyfill. 지금은 std::optional의 alias로 동작.
absl::popcount, countl_zero, countr_zero — C++20 <bit>의 polyfill. SwissTable·해시·정수 압축의 핵심 primitive.
absl::int128, uint128 — 64비트로 부족한 곳을 메우는 128비트 정수. 컴파일러 builtin과 emulation 양쪽을 가린 ABI.
BitGen 시드 관리 — OS entropy, SeedSeq, 결정적 재현성. 그리고 보안 한계.
MockingBitGen — 분포 호출의 결과값을 결정적으로 강제. flaky random 테스트를 끝낸다.
absl::Uniform, Gaussian, Exponential, Poisson 등 — std::*_distribution의 클래스 객체를 함수 호출로 평탄화.
absl::BitGen — std::mt19937 + std::uniform_int_distribution의 길고 verbose한 조합을 단일 호출로 압축한 random engine.