dyno
dyno copied to clipboard
Ensuring that poly<C, non_owning_storage, V> is trivially copyable.
This is the boring boilerplate bullshit that makes it possible for poly<C, non_owning_storage> to be trivially copyable - which is just a nice thing in certain contexts. There are more steps to take to improve this (i.e. there are several concepts that make no sense to type erase for non_owning_storage and we can just remove them), so this is just the first go.
I... don't understand the failure, sorry. You're gonna have to give me a hint:
In file included from /home/travis/build/ldionne/dyno/benchmark/n_functions.cpp:7:0:
/home/travis/build/ldionne/dyno/dependencies/install/include/benchmark/benchmark.h: In instantiation of ‘void benchmark::DoNotOptimize(Tp&) [with Tp = {anonymous}::handrolled_local::any]’:
/home/travis/build/ldionne/dyno/benchmark/n_functions.cpp:231:31: required from ‘void BM_any_1_function(benchmark::State&) [with Any = {anonymous}::handrolled_local::any]’
/home/travis/build/ldionne/dyno/benchmark/n_functions.cpp:294:1: required from here
/home/travis/build/ldionne/dyno/dependencies/install/include/benchmark/benchmark.h:324:48: error: read-only reference ‘value’ used as ‘asm’ output
asm volatile("" : "+m,r"(value) : : "memory");
^
Hi Barry, the build failure looks unrelated to this PR.
This error is caused by calling benchmark::DoNotOptimize with a non-const reference to an object that contains a const subobject. I see Louis has already reported the issue: https://github.com/google/benchmark/issues/764
I'm just here because this was the only search result for "error: read-only reference" "used as ‘asm’ output", so hopefully that helps someone else 🙂