MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/akihlv/c_modules_might_be_deadonarrival/ef7cmly/?context=3
r/cpp • u/SAHChandler • Jan 28 '19
240 comments sorted by
View all comments
16
will modules actually help those template heavy, header only libs?
26 u/[deleted] Jan 28 '19 They don't avoid the need to instantiate templates in every TU that uses them, so no. 3 u/Ameisen vemips, avr, rendering, systems Jan 28 '19 Is there a good way to precompile template-heavy headers or modules? 3 u/anon_502 delete this; Jan 29 '19 You can try extern template by manually specifying commonly-used instantiations. 1 u/GabrielDosReis Feb 03 '19 Exported templates are parsed only once. 1 u/Ameisen vemips, avr, rendering, systems Feb 03 '19 It does imply knowing what the types will be ahead of time, though.
26
They don't avoid the need to instantiate templates in every TU that uses them, so no.
3 u/Ameisen vemips, avr, rendering, systems Jan 28 '19 Is there a good way to precompile template-heavy headers or modules? 3 u/anon_502 delete this; Jan 29 '19 You can try extern template by manually specifying commonly-used instantiations. 1 u/GabrielDosReis Feb 03 '19 Exported templates are parsed only once. 1 u/Ameisen vemips, avr, rendering, systems Feb 03 '19 It does imply knowing what the types will be ahead of time, though.
3
Is there a good way to precompile template-heavy headers or modules?
3 u/anon_502 delete this; Jan 29 '19 You can try extern template by manually specifying commonly-used instantiations. 1 u/GabrielDosReis Feb 03 '19 Exported templates are parsed only once. 1 u/Ameisen vemips, avr, rendering, systems Feb 03 '19 It does imply knowing what the types will be ahead of time, though.
You can try extern template by manually specifying commonly-used instantiations.
1
Exported templates are parsed only once.
1 u/Ameisen vemips, avr, rendering, systems Feb 03 '19 It does imply knowing what the types will be ahead of time, though.
It does imply knowing what the types will be ahead of time, though.
16
u/feverzsj Jan 28 '19
will modules actually help those template heavy, header only libs?