Use type class for implementing bit flag conversions