M
Mike -- Email Ignored
In a class that is not a template class, can one
of the constructors be a template function?
Thanks,
Mike.
of the constructors be a template function?
Thanks,
Mike.
Mike said:In a class that is not a template class, can one
of the constructors be a template function?
In a class that is not a template class, can one
of the constructors be a template function?
Cheers & hth.,
- Alf
Mike said:]Cheers & hth.,
- Alf
This is useful information. In my case, an argument can by any
of the unsigned integer types. AFAICS, there should be no
problem, your admonitions notwithstanding. Please let me know
if you disagree.
[...]
This is useful information. In my case, an argument can by
any of the unsigned integer types. AFAICS, there should be no
problem, your admonitions notwithstanding. Please let me know
if you disagree.
[...]
What's the problem with just having a single constructor which takes an
unsigned long long? This sounds like a case where templates are NOT the
answer.
Mike said:What's the problem with just having a single constructor which takes an
unsigned long long? This sounds like a case where templates are NOT the
answer.
I was doing a computation that involved sizeof(TYP),
but it may not be necessary, in which case uint64_t
would be good.
If both would work, what is the downside of using
a template?
BTW, is unsigned long long defined as uint64_t,
or might it change?
What's the problem with just having a single constructor
which takes an unsigned long long? This sounds like a case
where templates are NOT the answer.
I was doing a computation that involved sizeof(TYP),
but it may not be necessary, in which case uint64_t
would be good.
If both would work, what is the downside of using
a template?
BTW, is unsigned long long defined as uint64_t,
or might it change?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.