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

[rejects-valid] template typedef relaxed parameter binding #61

Open
fangism opened this issue Jul 14, 2016 · 1 comment
Open

[rejects-valid] template typedef relaxed parameter binding #61

fangism opened this issue Jul 14, 2016 · 1 comment
Assignees

Comments

@fangism
Copy link
Owner

fangism commented Jul 14, 2016

file:

template <><pint N; pint B[N]>
defproc int_source(chan!(int) R) {
  chp {
    *[ {;i:N: R!(B[i]) } ]
  }
}

template <><pint N>
typedef int_source<><1, {N}> int_source_constant;

haco compilation gives:

ERROR: failed to make process_type_reference because template argument types do not match.
ERROR making complete type reference.  [9:9..28]
ERROR resolving concrete type reference in typedef!  [9:9..28]

In general, the use of template typedefs requires delayed evaluation.

@fangism
Copy link
Owner Author

fangism commented Jul 14, 2016

The following case (without relaxed parameters) works:

template <pint N; pint B[N]>
defproc int_source(chan!(int) R) {
  chp {
    *[ {;i:N: R!(B[i]) } ]
  }
}

template <pint N>
typedef int_source<1, {N}> int_source_constant;

@fangism fangism self-assigned this Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant