You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Gábor Gyimesi (Jira)" <ji...@apache.org> on 2022/05/02 09:53:00 UTC

[jira] [Commented] (MINIFICPP-1817) Use magic enum library instead of SMART_ENUM macros

    [ https://issues.apache.org/jira/browse/MINIFICPP-1817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17530657#comment-17530657 ] 

Gábor Gyimesi commented on MINIFICPP-1817:
------------------------------------------

The introduction is not trivial. Our current implementation of SMART_ENUM uses alternative strings for each enum value to be used for the string representation. magic_enum can only convert the enum value to the corresponding string (as defined by the enum value) and cannot use alternative string representations. In some cases we cannot use the enum value as the string representation as out string representations (for example previously defined property value options) require to be c++ keywords or values that include spaces.

> Use magic enum library instead of SMART_ENUM macros
> ---------------------------------------------------
>
>                 Key: MINIFICPP-1817
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-1817
>             Project: Apache NiFi MiNiFi C++
>          Issue Type: Improvement
>            Reporter: Gábor Gyimesi
>            Priority: Minor
>
> Instead of the currently used SMART_ENUM macros we could use [Neargye/magic_enum|https://github.com/Neargye/magic_enum] library written in C++17.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)