EPICS Home

Experimental Physics and Industrial Control System


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

Subject: Re: [Merge] lp:~johill-lanl/epics-base/epics-base-enclosure-of into lp:epics-base
From: Jeff Hill <[email protected]>
To: Jeff Hill <[email protected]>
Date: Thu, 21 Nov 2013 17:01:42 -0000
> Using reinterpret_cast<> to bypass these checks seems questionable to me. I'm worried 
> that this might involve Undefined Behavior.

This is certainly a reasonable point. My restricted use of enclosureOf (i.e. only with single inheritance c++ classes) would probably never actually cause troubles with compiler portability or undefined behavior, but now I am considering this question; why would we accept any risk at all in this area.

At the root of this functionality is a desire to reduce the size of the data structures; we might avoid storing a pointer to the enclosing class within interface adapter classes. However, given that only large memory chips are manufactured today then perhaps its best to just store the additional pointer.

Thanks for your review.

PS: The latest C++ standard is actually relaxing its restrictions related to what is and isn't considered to be POD, BTW.



-- 
https://code.launchpad.net/~johill-lanl/epics-base/epics-base-enclosure-of/+merge/196010
Your team EPICS Core Developers is requested to review the proposed merge of lp:~johill-lanl/epics-base/epics-base-enclosure-of into lp:epics-base.


Replies:
Re: [Merge] lp:~johill-lanl/epics-base/epics-base-enclosure-of into lp:epics-base mdavidsaver
References:
[Merge] lp:~johill-lanl/epics-base/epics-base-enclosure-of into lp:epics-base Jeff Hill

Navigate by Date:
Prev: Base 3.14.12.4-pre1 available for testing Andrew Johnson
Next: Re: [Merge] lp:~epics-core/epics-base/devlib2mmio into lp:epics-base Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: [Merge] lp:~johill-lanl/epics-base/epics-base-enclosure-of into lp:epics-base Jeff Hill
Next: Re: [Merge] lp:~johill-lanl/epics-base/epics-base-enclosure-of into lp:epics-base mdavidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024