The rule of five/zero

C++11부터 이동 생성자, 이동 대입 연산자를 지원함에 따라 컴파일러가 자동으로 생성해 주는 함수(Compiler-generated Functions, 이하 CGF)들이 늘어 났다. 본 글에서는 5가지의 CGF를 작성하는 규칙에 관한 내용이다. 5-CGF destructor copy constructor...

Integer overflow

In computer programming, an integer overflow occurs when an arithmetic operation attempts to create a numeric value that is outside of the range that can be represented with a given...

Osquery's Event Framework

본 글은 How RocksDB is used in osquery의 내용 중 Event Framework에 관한 것을 번역 및 추가 해석 한 것이다. Event Framework는 크게 2가지의 주체를 가진다. Event Publisher: Event를 발생시키는...

Meyer’s Singleton

Meyer’s Singleton 본 글에서는 C++에서 Singleton을 구현하는 방법 중 하나인 Meyer’s Singleton 기법에 대해 소개한다. Scott Meyer에 의해 제안 된 것으로 function static object을 이용하여 간단하게 Singleton을 구현한다. 먼저 샘플...

Get diff between vectors

Vector Vectors are sequence containers representing arrays that can change in size. std::vector는 stl에서 많이 쓰이는 컨테이너 중 하나다. std::vector간에 diff를 stl 함수에 대해 알아보자. std::set_difference std::set_difference는 에 있는 함수로...