it's because the T should be box&, and in <> i give "box", so it's not consistent.
another problem is that the return type, explicit and original template should be consistent, in my opinion.
so
template <typename T> T bdi(T, T);
template <> box& bdi<box&>(box& a, box& b);
or
template <typename T> T bdi(T&, T&);
template <> box bdi<box>(box&, box&);
:)