Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of C++14 make_index_sequence #48

Open
pippijn opened this issue Sep 2, 2014 · 4 comments
Open

Make use of C++14 make_index_sequence #48

pippijn opened this issue Sep 2, 2014 · 4 comments
Assignees

Comments

@pippijn
Copy link
Contributor

pippijn commented Sep 2, 2014

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
Copy link
Contributor Author

pippijn commented Sep 2, 2014

Actually, use std::index_sequence_for, instead.

@UnixJunkie
Copy link

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

@UnixJunkie
Copy link

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'

@pippijn pippijn self-assigned this Sep 3, 2014
@pippijn
Copy link
Contributor Author

pippijn commented Sep 3, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants