clangml icon indicating copy to clipboard operation
clangml copied to clipboard

Make use of C++14 make_index_sequence

Open pippijn opened this issue 11 years ago • 4 comments

Change https://github.com/Antique-team/clangml/blob/master/tools/bridgen/c%2B%2B/ocaml%2B%2B.h#L486 to use std::make_index_sequence http://en.cppreference.com/w/cpp/utility/integer_sequence

pippijn avatar Sep 02 '14 17:09 pippijn

Actually, use std::index_sequence_for, instead.

pippijn avatar Sep 02 '14 17:09 pippijn

Would it fix something? This is C++14 and we are currently using c++11.

UnixJunkie avatar Sep 03 '14 08:09 UnixJunkie

Even with -std=c++1y and clang++ 3.4, it doesn't compile:

tools/bridgen/c++/ocaml++.h:486:22: error: no member named 'index_sequence_for' in namespace 'std'

UnixJunkie avatar Sep 03 '14 08:09 UnixJunkie

It would fix nothing, but it would make the code clearer. Consider this low priority and something that can be done after C++14 is out. Another example is using enable_if_t here: https://github.com/Antique-team/clangml/blob/master/tools/bridgen/c%2B%2B/ocaml%2B%2B.h#L278

pippijn avatar Sep 03 '14 08:09 pippijn