diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-07-31T14·35+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-07-31T14·35+0200 |
commit | d9e8ab0ff25979baa5b3c852f6a5aeb7b9d2ed36 (patch) | |
tree | d80c117d64dcb3bcac1e5365ceee51f18f1b4e91 | |
parent | 607e75083af97b12df1cfacb82e2e1e69fdd5517 (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'.
-rw-r--r-- | src/libutil/serialise.cc | 4 |
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 |