| ▲ | fooker 4 hours ago | ||||||||||||||||
C++ templates and metaprogramming is fundamentally incompatible with the idea of your code being treated in modules. The current solution chosen by compilers is to basically have a copy of your code for every dependency that wants to specialize something. For template heavy code, this is a combinatorial explosion. | |||||||||||||||||
| ▲ | WalterBright 4 hours ago | parent | next [-] | ||||||||||||||||
D has best-in-class templates and metaprogramming, and modules. It works fine. | |||||||||||||||||
| ▲ | direwolf20 37 minutes ago | parent | prev | next [-] | ||||||||||||||||
The compiler is supposed to put the template IR into the compiled module file, isn't it? | |||||||||||||||||
| |||||||||||||||||
| ▲ | amluto 2 hours ago | parent | prev | next [-] | ||||||||||||||||
I think that SFINAE and, to a lesser extent, concepts is fundamentally a bit odd when multiple translation units are involved, but otherwise I don’t see the problem. It’s regrettable that the question of whether a type meets the requirements to call some overload or to branch in a particular if constexpr expression, etc, can depend on what else is in scope. | |||||||||||||||||
| |||||||||||||||||
| ▲ | pjmlp 4 hours ago | parent | prev [-] | ||||||||||||||||
It has worked perfectly fine while using VC++, minus the usual ICE that still come up. | |||||||||||||||||
| |||||||||||||||||