ldionne on gh-pages
Update benchmarks to 490dbf6 fo… (compare)
ldionne on gh-pages
Update benchmarks to 490dbf6 fo… (compare)
ldionne on gh-pages
Update benchmarks to 490dbf6 fo… (compare)
ldionne on gh-pages
Update benchmarks to 490dbf6 fo… (compare)
ldionne on gh-pages
Update benchmarks to 490dbf6 fo… (compare)
template <class Tup>
auto tuple_ref(Tup& tup)
{
return hana::transform(tup, [](auto& t) { return std::ref(t); });
}
....
auto cg_ref = tuple_ref(component_groups_tuple);
auto filterd_cg_ref = hana::filter(cg_ref, [](auto& cg) {
return hana::bool_c<true>;
});
struct position
{
float x, y;
};
struct velocity
{
float x, y;
};
int main()
{
auto tup = hana::make_tuple(position{1,2}, velocity{1,2});
auto tup_ref = hana::transform(tup, [](auto& t) { return std::ref(t); });
auto test = hana::filter(tup_ref, [](auto& tref){
return hana::bool_c<true>;
});
}
1. <eof> parser at end of file
2. ../dependencies/hana/include/boost/hana/filter.hpp:103:18: instantiating function definition 'operator()'
3. ../dependencies/hana/include/boost/hana/filter.hpp:103:18: LLVM IR generation of declaration 'boost::hana::detail::make_filter_indices<(lambda at ../examples/ecs/main.cpp:113:37)>::operator()'
4. ../dependencies/hana/include/boost/hana/filter.hpp:103:18: Mangling declaration 'boost::hana::detail::make_filter_indices<(lambda at ../examples/ecs/main.cpp:113:37)>::operator()'
clang-3.7: error: unable to execute command: Segmentation fault (core dumped)
clang-3.7: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.7: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-3.7: note: diagnostic msg:
btw is there some restriction in hana::filter?
auto components_filter = hana::filter(components_ref, [&filter](auto cref) {
return contains_type(filter, cref.get());
});
If I create a custom move constructor for the type of cref
it doesn't compile anymore and throws
../dependencies/hana/include/boost/hana/basic_tuple.hpp:168:20: error: no matching function for call to object of type 'boost::hana::detail::make_filter_indices<(lambda at ../src/ecs/core/core.hpp:39:59)>'
return static_cast<F&&>(f)(
note: candidate template ignored: substitution failure [with X = <const std::reference_wrapper<breeze::util::container::handle_container<position, std::vector<position, std::allocator<position> > > > &, const std::reference_wrapper<breeze::util::container::handle_container<velocity, std::vector<velocity, std::allocator<velocity> > > > &>]
auto operator()(X&& ...x) const -> filter_indices<
constexpr auto contains_type(Tup&& tup, T)
```
struct position
{
float x, y;
};
struct velocity
{
float x, y;
};
int main()
{
auto tup = hana::make_tuple(position{1,2}, velocity{1,2});
auto tup_ref = hana::transform(tup, [](auto& t) { return std::ref(t); });
auto test = hana::filter(tup_ref, [](auto& tref){
return hana::bool_c<true>;
});
}
readelf -sV /usr/lib/libstdc++.so.6 | sed -n 's/.*@@GLIBCXX_//p' | sort -u -V | tail -1