Checking the dimensions of units and quantities at compile time