• Kenton Varda's avatar
    Work around Clang bug 22354. · b0599220
    Kenton Varda authored
    https://llvm.org/bugs/show_bug.cgi?id=22354
    
    At the time DisallowConstCopy was introduced, GCC 4.7 and Clang 3.2 refused to allow the non-const copy constructors to be defaulted inline. This must have been concluded to be a compiler bug, as GCC 4.8 and Clang 3.4 seem fine with it. So, we can clean this up.
    
    Meanwhile, the above-linked Clang bug triggered when a DisallowConstCopy derivative is captured by value in a C++14 generic lambda. capnp::CallContext in particular tended to be hit by this a lot. The bug only affects non-default (or out-of-line default) copy constructors, and thus is conveniently sidestepped by this change.
    b0599220
common.h 46.7 KB