Skip to main content

2 posts tagged with "C++"

View All Tags

· 8 min read
Richard Haar

NPM#

NPM hosts over 1.7 million packages at the time of writing, with over 35 billion downloaded packages in the last week alone. Originally the package manager for Node.js, but taking over as the package manager for all of JavaScript. The cool thing with Node.js is that you can compile some C++ to a node addon, making it available for use in JavaScript, so you get the benefit of native code.

So for my first publicly uploaded NPM module, I wanted to create a Cyclic Redundancy Check (CRC) module that conformed to the AUTOSAR (AUTomotive Open System ARchitecture) spec but written in C++.

· 4 min read
Richard Haar

In C++17, the std::variant was introduced alongside the std::visit function which allows you to implement the Visitor pattern rather easily. To begin with I'll explain how to use the std::variant and how it fit's into the Visitor pattern.