Make fbstring libgcc-safe
Summary:
Some libgcc-incompatible code has been added to fbstring.
Removed/reorganized it so that we can drop fbstring right into libgcc.
Test Plan:
fbconfig -r folly && fbmake runtests
Copied FBString.h into libgcc's basic_fbstring.h, with no modifications.
Successfully tp2_build libgcc/4.8.1. Adjusted symlink, then fbmake clean
&& fbconfig -r folly && fbmake dbg. The fbmake dbg failed with an
assertion error, which is consistent with @lucian's observations in
D1373725; the important part is that the error was at runtime, so the
compile-time changes of this diff looks good.
Reviewed By: lucian@fb.com
Subscribers: folly@lists, sdwilsh, njormrod, lucian
FB internal diff:
D1382873