Skip to content

Instantly share code, notes, and snippets.

@thiagomg
Created September 16, 2015 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thiagomg/3141aaba344aaf8c029c to your computer and use it in GitHub Desktop.
Save thiagomg/3141aaba344aaf8c029c to your computer and use it in GitHub Desktop.
Template and OO
template <>
struct add<bool> {
add(std::string &buffer, bool val, int size_inc) {
string s = val?"Y":"N";
_check_size(buffer, s.size(), size_inc);
buffer += s;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment