You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Chuck Rolke (Commented) (JIRA)" <ji...@apache.org> on 2011/10/14 22:20:11 UTC

[jira] [Commented] (QPID-2323) Add uuid to variant

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

Chuck Rolke commented on QPID-2323:
-----------------------------------

This file has several instances of references with a 'const' issue on Solaris.
The issue is solved for one instance in Uuid.cpp in 
http://mail-archives.apache.org/mod_mbox/qpid-commits/200911.mbox/%3C20091118061200.BD5E12388865@eris.apache.org%3E
where const_cast is applied: const_cast<uint8_t*>(data)

I propose adding a macro somewhere and a compile-time switch to control it:

#ifdef SUNOS
#   define UUID_DATA(X) const_cast<uint8_t*>((X))
#else
#   define UUID_DATA(X) (X)
#endif

Files types/Uuid.cpp and framing/Uuid.cpp would both use this scheme.
Then Linux platforms all enjoy the benefits of const-ness while only
Solaris loses const-ness.

This applies to all compilers, SolStudio or g++ or whatever.
-------
Alternatively, the offending call sites could simply be changed
to the const_cast<> and be done with it.
                
> Add uuid to variant
> -------------------
>
>                 Key: QPID-2323
>                 URL: https://issues.apache.org/jira/browse/QPID-2323
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Client
>    Affects Versions: 0.6
>            Reporter: Gordon Sim
>            Assignee: Gordon Sim
>             Fix For: 0.7
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org