Add a check for broken Boost versions

In some Boost versions, coroutines don't propagate exceptions
properly, causing Nix to fail with the exception 'coroutine has
finished'.
This commit is contained in:
Eelco Dolstra 2018-07-31 16:35:05 +02:00
parent 607e75083a
commit d9e8ab0ff2
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -157,6 +157,10 @@ size_t StringSource::read(unsigned char * data, size_t len)
}
#if BOOST_VERSION >= 106300 && BOOST_VERSION < 106600
#error Coroutines are broken in this version of Boost!
#endif
std::unique_ptr<Source> sinkToSource(std::function<void(Sink &)> fun)
{
struct SinkToSource : Source