Can I safely replace a bool member with unsigned char in a public header?
<p>I ship a public header that users compile against to utilize classes contained within.  I need to fix an issue in the shared library that implements one of these public classes and have a requirement that existing users need not recompile their libraries when installing a patch.  The fix requires a bool member to be able to hold more information than false,true.
The class looks like</p>

<pre><code>class PublicAPI{
...
public:
  bool getSync();
  void setSync(bool sync);
...
private
  bool sync_;
...
};
</code></pre>

<p>I'd like to change <code>bool sync_; to unsigned char sync_;</code>:</p>

<pre><code>class PublicAPI{
...
public:
  bool getSync();
  void setSync(bool sync);
...
private
  unsigned char sync_;
...
};
</code></pre>

<p>Note that the getters and setters won't and I don't think can change.  They will be ok, since the user will not need to be aware of the additional values sync_ contains and I will handle retaining my values internally.  Obviously this is an ugly hack, but I think technically it's ok because the size of the class won't change.  </p>

<p>My concern is that a compiler on one of the platforms I ship on Linux, AIX, HPUX, Solaris, Windows will play some game with the bool type I'm not aware of and break something.</p>

<p>Any thoughts on how safe or dangerous this is?</p>
