caide-cpp-inliner icon indicating copy to clipboard operation
caide-cpp-inliner copied to clipboard

Declarations referenced in a dependent template argument may get removed

Open AlCash07 opened this issue 8 years ago • 3 comments

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 avatar Jul 01 '17 20:07 AlCash07

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

AlCash07 avatar Sep 01 '18 19:09 AlCash07