Tag: c++
-
__builtin_popcountg
Looking at https://en.cppreference.com/cpp/utility/bitset/count, I was intrigued to see popcount mentioned in the “See also” section. Handy. That made me curious to see how the stdlibs choose to implement it. Here it is for Clang: libcxx/include/__bit/popcount.h For gcc: libstdc++-v3/include/std/bit So, there’s at least one configuration where they end up both calling something called __builtin_popcountg. What are…
-
Telling g++ about homebrew-installed lib
I’ve been having fun looking at some code created by a friend/ex-coworker, including https://github.com/hfgong/walker_vose. It makes use of the beloved to me GoogleTest C++ test framework. I guess probably the right thing to do is to set things up via one of the methods mentioned in the GoogleTest docs, Bazel or CMake. (I was very…
-
Regex in C++
I’ve missed out on a few things. It was fun to learn (or be reminded?) today that regular expressions have been part of the C++ std library for a while: https://en.cppreference.com/w/cpp/regex