Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AlCash07 opened this issue Jul 1, 2017 · 1 comment

Comments

@AlCash07
Copy link
Contributor

AlCash07 commented Jul 1, 2017

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; }

@slycelote slycelote changed the title Type alias is removed when used as a template parameter default type Declarations referenced in a dependent template argument may get removed Jul 2, 2017
@AlCash07
Copy link
Contributor Author

AlCash07 commented Sep 1, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant