Oh, sorry...
So the right code is like this?
>template<>
inline void
pack_uint(std::string & s, bool value)
{
    s += static_cast<char>(value);
}