1. 30 Apr, 2017 1 commit
  2. 29 Apr, 2017 8 commits
    • Harris Hancock's avatar
      Update samples CMakeLists.txt · eabee1af
      Harris Hancock authored
      Update outdated comment, and require CMake 3.1, which allows us to take
      advantage of target_compile_features.
      eabee1af
    • Harris Hancock's avatar
      Use target_compile_features to request C++11 · 1d0d1c3b
      Harris Hancock authored
      Projects which use Cap'n Proto require C++11, because they must be able to
      compile our headers. Old gcc defaults to C++98, forcing users to manually
      specify the -std=gnu++11 flag in their CMake projects. CMake 3.1
      introduced the target_compile_features command which removes this
      necessity by automatically communicating the C++ standard level
      requirement to client projects.
      
      Specifically, if target `kj` requires a C++11 feature publicly, then all
      targets which link to `kj` will also require that C++11 feature, and get
      the -std=gnu++11 flag for free. If that target is a library, such as
      `kj-async`, and `kj-async` links publicly to `kj`, the requirement is also
      transitive to all targets which link to `kj-async`.
      
      Note that CMake's default behavior is to request compiler-specific
      extensions, such as those provided by the -std=gnu++11 flag. You must
      specifically opt out of these extensions. I'm not aware of any way to
      propagate this nuance in CMake, but added a check to at least prevent
      users from compiling Cap'n Proto without extensions.
      
      With this change, the c++/samples/CMakeLists.txt will build with MinGW
      with no change beyond requiring a later version of CMake.
      1d0d1c3b
    • Harris Hancock's avatar
      Hack around VS2017 ICE · 8a8abe4b
      Harris Hancock authored
      VS2015 only barely compiled ~NullableValue's noexcept specifier
      expression. VS2017 can't at all, so we're going with noexcept(false) for
      MSVC for now.
      8a8abe4b
    • Harris Hancock's avatar
      Fix whitespace · 89b0d0bf
      Harris Hancock authored
      89b0d0bf
    • Kenton Varda's avatar
      Revert "Punt some TODOs to next release." · ab5e35e4
      Kenton Varda authored
      This reverts commit f836a5fc.
      ab5e35e4
    • Kenton Varda's avatar
      Set mainlaine version to 0.7-dev. · 22e9f2a5
      Kenton Varda authored
      22e9f2a5
    • Kenton Varda's avatar
      Punt some TODOs to next release. · f836a5fc
      Kenton Varda authored
      f836a5fc
    • Kenton Varda's avatar
      bcc2461a
  3. 28 Apr, 2017 16 commits
  4. 27 Apr, 2017 8 commits
  5. 26 Apr, 2017 4 commits
  6. 25 Apr, 2017 3 commits
    • Kenton Varda's avatar
      Work around ABI incompatibility between GCC and Clang. · 336f6bd7
      Kenton Varda authored
      Fixes #212
      336f6bd7
    • Kenton Varda's avatar
      Work around Clang and GCC disagreeing on name mangling. · bcd9e553
      Kenton Varda authored
      Specifically, consider:
      
          capnp::BuilderFor<capnp::DynamicStruct> capnp::Orphan<capnp::AnyPointer>::getAs<capnp::DynamicStruct>(capnp::StructSchema)
      
      Note that `BuilderFor` is a "template using" directive which expands into something more complicated.
      
      GCC mangles the symbol as:
      
          _ZN5capnp6OrphanINS_10AnyPointerEE5getAsINS_13DynamicStructEEENS_11BuilderFor_IT_Xcl4kindIS6_EEEE4TypeENS_12StructSchemaE
      
      Which `c++filt` decodes as:
      
          capnp::BuilderFor_<capnp::DynamicStruct, (kind<capnp::DynamicStruct>)()>::Type capnp::Orphan<capnp::AnyPointer>::getAs<capnp::DynamicStruct>(capnp::StructSchema)
      
      Note that `BuilderFor_<...>::Type` here ends up being a typedef for `DynamicStruct::Builder`. It seems weird to me that the symbol name would not substitute this typedef.
      
      Clang, meanwhile, mangles the symbol as:
      
          _ZN5capnp6OrphanINS_10AnyPointerEE5getAsINS_13DynamicStructEEENS_11BuilderFor_IT_Xclgssr5capnpE4kindIS6_EEEE4TypeENS_12StructSchemaE
      
      Which `c++filt` does not seem to be able to demangle at all. But, it looks like `capnp::kind` is in there, suggesting that, again, the typedef wasn't substituted.
      
      I don't know who is right, but if we inline the whole thing, the problem goes away.
      bcd9e553
    • Kenton Varda's avatar
      Don't report missing file ID error after parse error. · 880bbbbe
      Kenton Varda authored
      Fixes #251
      880bbbbe