기본 계약 작성
모든 타입에 공통으로 기대하는 의미와 반환 규칙을 primary template에 둔다.
특수화는 특정 타입에서 다른 구현을 쓰게 해 준다. 하지만 primary template과 의미가 어긋나면 호출자는 타입에 따라 전혀 다른 계약을 만나게 된다.
모든 타입에 공통으로 기대하는 의미와 반환 규칙을 primary template에 둔다.
정말 다른 알고리즘이 필요한 타입 조합만 full 또는 partial specialization으로 뺀다.
특수화가 더 빠를 수는 있어도 결과 의미와 예외 정책은 기본 규칙과 맞아야 한다.
template <typename T> struct IsByteBuffer : std::false_type {};
template <> struct IsByteBuffer<std::vector<std::byte>> : std::true_type {};
static_assert(IsByteBuffer<std::vector<std::byte>>::value);