qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuck Rolke (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-2323) Add uuid to variant
Date Fri, 14 Oct 2011 20:20:11 GMT

    [ 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 
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))
#   define UUID_DATA(X) (X)

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

View raw message