jlh wrote:
> template <int a>
> int shift (int b)
> {
> if (a > 0) {
> unsigned ua = a;
> return b >> ua;
> } else {
> unsigned ua = -a;
> return b << ua;
> }
> }
> template int shift<1>(int);
> template int shift<-1>(int);
Thanks, that works!
Phil.