about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-07-31T14·35+0200
committerEelco Dolstra <edolstra@gmail.com>2018-07-31T14·35+0200
commitd9e8ab0ff25979baa5b3c852f6a5aeb7b9d2ed36 (patch)
treed80c117d64dcb3bcac1e5365ceee51f18f1b4e91 /src
parent607e75083af97b12df1cfacb82e2e1e69fdd5517 (diff)
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'.
Diffstat (limited to 'src')
-rw-r--r--src/libutil/serialise.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/serialise.cc b/src/libutil/serialise.cc
index 21803edd056a..b2c49d911b34 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<Source> sinkToSource(std::function<void(Sink &)> fun)
 {
     struct SinkToSource : Source