qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PROTON-1369) Add deprecation warnings to the C++ binding
Date Tue, 26 Sep 2017 19:36:00 GMT

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

ASF GitHub Bot commented on PROTON-1369:
----------------------------------------

Github user astitcher commented on the issue:

    https://github.com/apache/qpid-proton/pull/120
  
    This is the CMake generated version of the deprecation macros:
    ```
    #  ifndef PN_DEPRECATED
    #    if defined(PN_COMPILER_CXX_ATTRIBUTE_DEPRECATED) && PN_COMPILER_CXX_ATTRIBUTE_DEPRECATED
    #      define PN_DEPRECATED [[deprecated]]
    #      define PN_DEPRECATED_MSG(MSG) [[deprecated(MSG)]]
    #    elif PN_COMPILER_IS_GNU || PN_COMPILER_IS_Clang
    #      define PN_DEPRECATED __attribute__((__deprecated__))
    #      define PN_DEPRECATED_MSG(MSG) __attribute__((__deprecated__(MSG)))
    #    elif PN_COMPILER_IS_MSVC
    #      define PN_DEPRECATED __declspec(deprecated)
    #      define PN_DEPRECATED_MSG(MSG) __declspec(deprecated(MSG))
    #    else
    #      define PN_DEPRECATED
    #      define PN_DEPRECATED_MSG(MSG)
    #    endif
    #  endif
    ```
    
    I note that it doesn't include the declaration itself - I take this to mean that you can
choose the correct place to put the macro do it works for all the supported compilers - This
certainly seems neater to me.


> Add deprecation warnings to the C++ binding
> -------------------------------------------
>
>                 Key: PROTON-1369
>                 URL: https://issues.apache.org/jira/browse/PROTON-1369
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: cpp-binding
>            Reporter: Ken Giusti
>            Assignee: Justin Ross
>            Priority: Trivial
>              Labels: api
>             Fix For: proton-c-0.18.0
>
>
> Once PROTON-225 is implemented, we should eventually remove the old interfaces after
marking them deprecated.
> Example:
> #ifdef __GNUC__
> #define DEPRECATED(func) func __attribute__ ((deprecated))
> #elif defined(_MSC_VER)
> #define DEPRECATED(func) __declspec(deprecated) func
> #else
> #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
> #define DEPRECATED(func) func
> #endif



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message