It seems this feature was added based on #391 and #984, but I personally consider this a bug: the entire purpose of enum class is to prevent any kind of implicit casting. If I wanted to format it as an integer, I should be forced to cast it to an integer or create my own formatter. Is there any recommended way to disable this? Perhaps a preprocessor option?
I have a custom formatter for some specific enum classes, but this implicit casting prevents me from being able to safely forward declare any of my enum classes, since if the custom formatter doesn't get included, format falls back to the default enum class -> int conversion. My formatter uses unique formatting specifiers that don't match anything found with the default int formatter, so when the wrong formatter is used a format_error is thrown.
It seems this feature was added based on #391 and #984, but I personally consider this a bug: the entire purpose of
enum classis to prevent any kind of implicit casting. If I wanted to format it as an integer, I should be forced to cast it to an integer or create my ownformatter. Is there any recommended way to disable this? Perhaps a preprocessor option?I have a custom
formatterfor some specificenum classes, but this implicit casting prevents me from being able to safely forward declare any of myenum classes, since if the customformatterdoesn't get included,formatfalls back to the defaultenum class->intconversion. Myformatteruses unique formatting specifiers that don't match anything found with the defaultintformatter, so when the wrong formatter is used aformat_erroris thrown.