Closed
Description
Do we allow overloading constructor with the same arity but different type for constructor parameters in P4-16? See code below for an example.
#include <core.p4>
enum HashAlgorithm_t {
CRC16
}
extern Polynomial<W> {
Polynomial(W w);
}
extern Hash {
Hash(HashAlgorithm_t algo);
Hash(Polynomial<_> poly);
bit<16> get<D>(in D data);
}
struct meta_t {
bit<16> f0;
}
control ingress(inout meta_t meta) {
Hash(Polynomial<bit<16>>(16w5678)) hash;
apply {
hash.get({meta.f0});
}
}