Created
September 16, 2015 01:22
-
-
Save thiagomg/3141aaba344aaf8c029c to your computer and use it in GitHub Desktop.
Template and OO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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