slycelote / caide-cpp-inliner

Transform a C++ program consisting of multiple source files and headers into a single self-contained source file without any external dependencies (except for standard system headers). Unused code is not included in the resulting file.
Other
32 stars 12 forks source link

Declarations referenced in a dependent template argument may get removed #8

Open AlCash07 opened 7 years ago

AlCash07 commented 7 years ago

Example: http://ideone.com/QaLeKP

If I rewrite the function in the following way, everything works: template <class Y> void f(Y& y) { typename Y::value_type value = 42; y.value = value; }

AlCash07 commented 5 years ago

This issue is actually very important for template metaprogramming. The following example fails on multiple levels: https://ideone.com/8UCOkK