Tag Archives: C++

Using C++11 variadic templates to create a type-safe and injection-safe database interface: part 1

Introduction Prior to C++11, there was no general way in C++ to create type-safe functions that would take a variable number of arguments. C++ had inherited …, the ellipsis operator, from C that would allow a function to take a … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

Writing a simple shell using Flex and Lemon: part 2

Introduction In part 1, we created a simple parser and driver for a basic shell that supports piping and command substitution. In order to test our parser, the driver in our last part only simulated reading tokens. In this part, … Continue reading

Posted in Uncategorized | Tagged , | 5 Comments

Writing a basic shell using Flex and Lemon: Part 1

Introduction I’ve recently decided to switch one of my projects from using the Bison parser generator to Lemon. Bison is the go to standard for parser generators, but after looking into Lemon, I really think that Lemon is safer, easier … Continue reading

Posted in Uncategorized | Tagged , | 6 Comments

C++ Assignment Operator or: How I Learned to Stop Worrying and not Check for Self-Assignment

If you’re already here, I’m going to assume you know a lot of the intricacies of writing an assignment operator in C++. Getting all the ins and outs of writing assignment operators is tricky – if you want a good … Continue reading

Posted in Uncategorized | Tagged , | 5 Comments