• Kenton Varda's avatar
    Add kj::arr() for specifying arrays easily. Requries C++17. · 6643b805
    Kenton Varda authored
    std::initializer_list is problematic because it insists that its elements be const, meaning among other things that you can't move from them. So, an std::initializer_list<kj::String> is often useless. With kj::arr you can do like:
    
        kj::Array<String> = kj::arr(kj::mv(string1), kj::mv(string2));
    
    This requires C++17 due to the fold expression. This could maybe be worked around using some ugly recursion but I'm writing C++17 these days so meh.
    6643b805
Name
Last commit
Last update
..
cmake Loading commit data...
ekam-provider Loading commit data...
m4 Loading commit data...
samples Loading commit data...
src Loading commit data...
CMakeLists.txt Loading commit data...
LICENSE.txt Loading commit data...
Makefile.am Loading commit data...
Makefile.ekam Loading commit data...
README.txt Loading commit data...
afl-fuzz.sh Loading commit data...
capnp-json.pc.in Loading commit data...
capnp-rpc.pc.in Loading commit data...
capnp.pc.in Loading commit data...
configure.ac Loading commit data...
kj-async.pc.in Loading commit data...
kj.pc.in Loading commit data...
regenerate-bootstraps.sh Loading commit data...
setup-autotools.sh Loading commit data...
setup-ekam.sh Loading commit data...