On Mon, Mar 21, 2016 at 9:48 PM John Peterson <[email protected]> wrote:
> This mistake should only even be possible if your UniquePtr is still a
> std::auto_ptr. Are you configured with --enable-unique-ptr? I don't think
> it's an issue with the libmesh interface, it's a well-known issue with
> std::auto_ptr that was masked by your use of "auto".
>
If this is true (that a UniquePtr has different behavior if you use
--enable-unique-ptr) then it DEFINITELY has nothing to do with my use of
"auto".
Look: if I hadn't used "auto" I would have written this line like so:
UniquePtr< NumericVector< Number > > solution_vector =
output_system.solution;
And I would have had _exactly_ the same problem I did.... with all of the
same amount of confusion and it still would have caused the same loss of
time and an email to libmesh-users pleading for help!
I _knew_ I was getting a UniquePtr with that call... the issue isn't in my
use of "auto"... it was solely in my misunderstanding of what UniquePtr
does.
And now you're telling me that if I had configured differently then I would
have / or not had this problem? That just lends credibility to my
statement that UniquePtr is NOT the right thing here.... and I'm even more
confused.
For the record... this is my current configure line:
./configure --prefix=${LIBMESH_DIR} \
--with-methods="${METHODS}" \
--enable-openmp \
--disable-tbb \
--disable-trilinos \
--disable-warnings \
--enable-silent-rules \
--disable-unique-id \
--disable-timestamps \
--disable-maintainer-mode
My point remains: doing an assignment should NOT invalidate a pointer
inside of a libMesh object as a side effect. That cannot be "desired"
behavior.
Derek
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users