From d9e8ab0ff25979baa5b3c852f6a5aeb7b9d2ed36 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 31 Jul 2018 16:35:05 +0200 Subject: [PATCH] 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'. --- src/libutil/serialise.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libutil/serialise.cc b/src/libutil/serialise.cc index 21803edd0..b2c49d911 100644 --- a/src/libutil/serialise.cc +++ b/src/libutil/serialise.cc @@ -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 sinkToSource(std::function fun) { struct SinkToSource : Source