EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Fwd: C++ compatibility
From: Andrew Johnson <[email protected]>
To: Jeff Hill <[email protected]>, "EPICS core-talk" <[email protected]>
Cc: "Pelaia II, Tom" <[email protected]>
Date: Fri, 11 Mar 2011 13:38:57 -0600
Hi Jeff,

An issue for you from the CA client library.  Tom's right about the rule (this 
is not a recent change either, it's present in my 1998 first edition of the 
spec), but I have no idea why the restriction exists.  I'm guessing that 
Apple's clang C++ compiler has started to check this.

Thanks Tom.

- Andrew

----------  Forwarded Message  ----------

Subject: C++ compatibility
Date: Friday 11 March 2011
From: "Pelaia II, Tom" <[email protected]>
To: Andrew Johnson <[email protected]>

Hi Andrew,

I believe there is an error in some EPICS base source files in which reference 
members are declared mutable:

In file included from ../cac.cpp:39:
../cac.h:269:5: error: 'mutable' cannot be applied to references
    mutable epicsMutex & mutex;
    ^
../cac.h:270:5: error: 'mutable' cannot be applied to references
    mutable epicsMutex & cbMutex;
    ^
In file included from ../cac.cpp:47:
../udpiiu.h:152:5: error: 'mutable' cannot be applied to references
    mutable epicsMutex & cbMutex;
    ^
../udpiiu.h:153:5: error: 'mutable' cannot be applied to references
    mutable epicsMutex & cacMutex;
    ^


The C++ specification (section 7.1.1 item 10) explicitly forbids mutable 
reference members:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf

Best regards,
Tom
___________________________________________________
Tom Pelaia  |  homepage: http://www.ornl.gov/~t6p

-----------------------------------------
-- 
An error is only a mistake if you don't learn from it.
When you learn something from it, it becomes a lesson.


Replies:
RE: C++ compatibility Jeff Hill

Navigate by Date:
Prev: Re: [Merge] lp:~mdavidsaver/epics-base/reorg-src into lp:epics-base mdavidsaver
Next: RE: C++ compatibility Jeff Hill
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: [Merge] lp:~mdavidsaver/epics-base/reorg-src into lp:epics-base Andrew Johnson
Next: RE: C++ compatibility Jeff Hill
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·