3 ms·
Efficient parameter pack indexing in C++
- coherentpony 11y agoThe results are completely garbled for me. Edit: Using an ancient version of Chrome on linux.
- Rexxar 11y agoDo you use add-on to block third party requests/ads ? If so, you have to unlock "http://www.highcharts.com/" http://www.highcharts.com/" to display the results.
- wrsh07 11y agoSame -- but I have js disabled. So that might be why.
- copperx 11y agoOff topic -- but how do you navigate the modern Web without js?
- comex 11y agoThe C++ template system is quite possibly the worst functional programming language ever 'designed', with the exception of esolangs. It would be so much saner if we could just run normal C++ code at compile time, with the ability to manipulate the main program's types as values. Then operations like this would simply be indexing a `std::vector<Type>`, there would be no need to add hacky special cases to the compiler and/or massively increase compilation time, and it would be possible to do somewhat more complex things without going insane (e.g. a compile-time perfect hash table generator, like gperf but without needing an external tool). Rust has something like this in the form of procedural macros, but it can't manipulate types and values, only raw ASTs. Apparently Nim can do it.
- srean 11y agoYour first paragraph actually describes D. In the D world the compile time language and the runtime language is the same thing. You can take a look to see if you like it.
- opk 11y agoWould be nice if the article explained what it means by a "parameter pack" to begin with.
- comex 11y agoIt's the variadic part of a C++11 variadic template: http://en.cppreference.com/w/cpp/language/parameter_pack http://en.cppreference.com/w/cpp/language/parameter_pack