EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: EPICS 7.0.1-pre1 (client.cpp)
From: Dirk Zimoch <[email protected]>
To: <[email protected]>
Date: Fri, 24 Nov 2017 10:48:49 +0100
I don't know how to fix this.

I cannot make ClientProvider::Impl a friend because it is not yet known when ClientChannel declares it is friends.

I cannot put ClientProvider in front of ClientChannel because it uses members of ClientChannel which will then be unknown.

On 24.11.2017 10:41, Dirk Zimoch wrote:


On 24.11.2017 08:38, Dirk Zimoch wrote:
vxWorks 6.3 fails with:

In file included from ../../src/client/client.cpp:15:
../../src/client/pv/pvAccess.h:1363: warning: `class
epics::pvAccess::ChannelProviderRegistry' has virtual functions but
non-virtual destructor
../../src/client/client.cpp:30: error: `struct
pvac::ClientChannel::Impl' is private
../../src/client/client.cpp:163: error: within this context
make[4]: *** [client.o] Error 1


gcc 3.4.4 probably follows this logic:

class epicsShareClass ClientChannel
{
    struct Impl;
    std::tr1::shared_ptr<Impl> impl;
    friend class ClientProvider;


ClientChannel::Impl is a private type of ClientChannel and
ClientProvider is a friend.


struct ClientProvider::Impl
{
    pva::ChannelProvider::shared_pointer provider;

    epicsMutex mutex;
    typedef std::map<std::pair<std::string, ClientChannel::Options>,
std::tr1::weak_ptr<ClientChannel::Impl> > channels_t;
    channels_t channels;
};

ClientProvider::Impl is not a friend of ClientChannel thus it cannot use
the private ClientChannel::Impl.

It seems other compiler versions have a broader understanding of
friendship than this one.




References:
EPICS 7.0.1-pre1 Andrew Johnson
Re: EPICS 7.0.1-pre1 Dirk Zimoch
Re: EPICS 7.0.1-pre1 (client.cpp) Dirk Zimoch
Re: EPICS 7.0.1-pre1 (client.cpp) Dirk Zimoch

Navigate by Date:
Prev: Re: EPICS 7.0.1-pre1 (client.cpp) Dirk Zimoch
Next: Re: EPICS 7.0.1-pre1 -- vxWorks 6.2 Dirk Zimoch
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS 7.0.1-pre1 (client.cpp) Dirk Zimoch
Next: Re: EPICS 7.0.1-pre1 -- vxWorks 6.2 Dirk Zimoch
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·