Experimental Physics and Industrial Control System
Subject: |
Re: epicsRingPointer.h error C2664: 'delete' : cannot convert parameter |
From: |
Jani Hakala <[email protected]> |
To: |
EPICS Tech-Talk <[email protected]> |
Date: |
Tue, 03 Feb 2015 04:45:13 +0200 |
"J. Lewis Muir" <[email protected]> writes:
> Obviously, it seems to be unhappy with the "delete" on line 93 of
> epicsRingPointer.h, but I don't know how to fix it. Here's a
> Microsoft reference for compiler error C2664 for Visual Studio 2013
> (not the compiler used) in case it helps:
>
My guess is that the compiler doesn't like the volatile data members in
the class.
> Any ideas?
>
The class could be perhaps implemented using a mutex for locking if the
code in epicsRingPointer class needs to be thread-safe.
The uses of epicsRingPointerCreate, epicsRingPointerPush,
epicsRingPointerPop, etc. seem to be coupled with some locking. Perhaps
those volatile type qualifiers could be removed from epicsRingPointer
class.
In any case, page
http://en.wikipedia.org/wiki/Volatile_%28computer_programming%29
says that
"C++11
According to the C++11 ISO Standard, the volatile keyword is only meant
for use for hardware access; do not use it for inter-thread
communication. For inter-thread communication, the standard library
provides std::atomic<T> templates."
Jani Hakala
- References:
- epicsRingPointer.h error C2664: 'delete' : cannot convert parameter J. Lewis Muir
- Navigate by Date:
- Prev:
RE: epicsRingPointer.h error C2664: 'delete' : cannot convert parameter Mark S. Engbretson
- Next:
Problem about cross-complie SynApps 吴洪金
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: epicsRingPointer.h error C2664: 'delete' : cannot convert parameter J. Lewis Muir
- Next:
related to coding priya tiwari
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024