Sprout is needed because pow, log2 and log10 are constexpr on gcc,
but that's nonstandard. Sprout provides the constexpr version of
those functions.
Also fix warnings. I still get plenty of warnings about some suggested
paretheses, but it seems to be a bug from clang. See
https://llvm.org/bugs/show_bug.cgi?id=21629 for the bug report.
This also fixes a subtle bug: the size passed to MaxSizedArray in
int_to_string() was calculated on the max value of type F, but when
F was a signed type the max would only be for example 31 bits.
Conversion of negative numbers would then fail with an assertion.
They are useful in the Redis backend and in helpers itself.
People wanting to use pq alone from this project will have to cope and
search for all the needed files.
Note that the interface is still a work in progress and might change
while still keeping the same interface version. This is going to be true
until the first stable release of this project (non beta).
This also adds a public dependency to machinery in the header-only
backend project. This is because the backend does need functionality
from machinery, such as FileRecordData and TigerHash.
Newer versions of gcc have a small string optimizations that makes
moving FileRecordData objects behave incorrectly. When a small string is
moved, string_refs into it become invalid. Making a path on the fly
using the path() method also has the side effect of making
FileRecordData smaller in size.
This saves having to remember to do STRING(TOUPPER) in every cmake file.
At times that's really not convenient if possible at all.
For example when a top-level project is guessing what option some
subproject is going to use and tries to use it for the builtin options
view. The acutal OPTION statement is not there, and it's not nice to put
a string(toupper) on a variable that seems to come from nowhere (and in
fact it might not be there at all).