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)
std::vector
won’t allow for references.
std::reference_wrapper
s, but then you’ll have to use args[“a”_param].get()
inside the function
.
Would it be possible to add that auto operator= to type and integral_constant?
You mean to create pairs? I think that's clearly out of Hana's scope, since Hana is a general purpose library, not a named parameter library. The right approach would be for you to create wrappers over type
and integral_constant
. Or more generally, I would probably do something like
template <typename Param>
struct param_t {
// define operator=
};
template <typename Param>
constexpr param_t<Param> param{};
Then, you can use the thing as
f(param<hana::int_<3>> = "three", param<hana::type<int>> = "int", ...);
The syntactic overhead is very reasonable, and it clearly says what it's doing. Just my .02.
You mentioned some things about improving map before. I would like to discuss it, when you are not too busy.
I'd be happy to discuss it. I'll try to put my thoughts on paper and I'll create an issue documenting them. Then, we can talk about it either here or on GitHub. Sounds reasonable?
constexpr auto foo = hana::type_c<int>;
constexpr auto bar = hana::type_c<double>;
hana::make_map(
foo = "foo",
bar = "bar",
"foo"_s = "foo",
"bar"_s = "bar",
5_c = "five",
42_c = "forty-two"
);
But then the following fails, because assignment is not what we expect it to be:
hana::tuple<int, int, hana::type<char>> t{1, 2, {}};
hana::tuple<int, int, hana::type<char>> u{3, 4, {}};
t = u;
Actually, it will even compile but fail to do the right thing. Since type
, integral_constant
& al are stateless this is OK strictly speaking (assignment has no effect anyway), but I really think this is conceptually wrong.
RUBY_ROOT
option or something
var hana = github.getRepo('boostorg', 'hana');
hana.getRef('heads/datasets', function(err, sha) {
var repo = "https://cdn.rawgit.com/boostorg/hana/" + sha + "/release/clang-3.6.2/";
$(".benchmark-chart").each(function(index, div) {
var dataset = div.getAttribute("damplement efficiently, because it requires stopping at the first element which satisfies the given predicate. For the same reason, modern techniques don't really help us here, so this algorithm constitutes a good test of the implementation quality of Hana, without taking into account the free lunch given to use by C++14.
Number of elementsTime (s)Compile-time behavior of findta-dataset");
$.getJSON(repo + dataset, function(options) {
Hana.initChart($(div), options);
});
});
div.getAttribute
argument looks awfully suspicious
div.getAttribute
, where is it?
"damplement efficiently, because it require…”
?
class
or style
or something :laughing:
var dataset = div.getAttribute("data-dataset");