mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-16 20:24:48 -06:00
For g++-4.4 support for nullptr is not complete. Using it to initialize an empty shared_ptr breaks compilation: /home/mblatt/src/dune/opm/opm-autodiff/opm/autodiff/AutoDiffHelpers.hpp: In constructor ‘Opm::HelperOps::HelperOps(const Grid&, Opm::EclipseStateConstPtr)’: /home/mblatt/src/dune/opm/opm-autodiff/opm/autodiff/AutoDiffHelpers.hpp:87: error: no match for ternary ‘operator?:’ in ‘(bool)eclState ? eclState->.Opm::EclipseState::getNNC() : nullptr’ /home/mblatt/src/dune/opm/opm-autodiff/opm/autodiff/AutoDiffHelpers.hpp:87: note: candidates are: operator?:(bool, const Opm::NNC* std::__shared_ptr<const Opm::NNC, (__gnu_cxx::_Lock_policy)2u>::*, const Opm::NNC* std::__shared_ptr<const Opm::NNC, (__gnu_cxx::_Lock_policy)2u>::*) <built-in> /home/mblatt/src/dune/opm/opm-autodiff/opm/autodiff/AutoDiffHelpers.hpp:87: note: operator?:(bool, const Opm::NNC* std::__shared_ptr<const Opm::NNC, (__gnu_cxx::_Lock_policy)2u>::*, T*) <built-in> Here no conversion to shared_ptr happens. /home/mblatt/src/dune/opm/opm-autodiff/opm/autodiff/ImpesTPFAAD.cpp: In constructor ‘Opm::HelperOps::HelperOps(const Grid&, Opm::EclipseStateConstPtr) [with Grid = UnstructuredGrid]’: /home/mblatt/src/dune/opm/opm-autodiff/opm/autodiff/ImpesTPFAAD.cpp:160: error: no matching function for call to ‘std::shared_ptr<const Opm::EclipseState>::shared_ptr(const dune_nullptr_t&)’ /usr/include/c++/4.4/bits/shared_ptr.h:1263: note: candidates are: std::shared_ptr<_Tp>::shared_ptr(std::shared_ptr<_Tp>&&) [with _Tp = const Opm::EclipseState] /usr/include/c++/4.4/bits/shared_ptr.h:1238: note: std::shared_ptr<_Tp>::shared_ptr() [with _Tp = const Opm::EclipseState] /usr/include/c++/4.4/bits/shared_ptr.h:1236: note: std::shared_ptr<const Opm::EclipseState>::shared_ptr(const std::shared_ptr<const Opm::EclipseState>&) Here the DUNE's nullptr implementation is used with std::shared_ptr which are not compatible. We fix this by using the emptry constructor of std::shared_ptr to create a nullptr. |
||
---|---|---|
.. | ||
AutoDiff.hpp | ||
AutoDiffBlock.hpp | ||
AutoDiffHelpers.hpp | ||
BackupRestore.hpp | ||
BlackoilModel.hpp | ||
BlackoilModelBase_impl.hpp | ||
BlackoilModelBase.hpp | ||
BlackoilModelEnums.hpp | ||
BlackoilModelParameters.cpp | ||
BlackoilModelParameters.hpp | ||
BlackoilPropsAdFromDeck.cpp | ||
BlackoilPropsAdFromDeck.hpp | ||
BlackoilPropsAdInterface.cpp | ||
BlackoilPropsAdInterface.hpp | ||
CPRPreconditioner.hpp | ||
DuneMatrix.hpp | ||
ExtractParallelGridInformationToISTL.cpp | ||
ExtractParallelGridInformationToISTL.hpp | ||
fastSparseProduct.hpp | ||
GeoProps.hpp | ||
GridHelpers.cpp | ||
GridHelpers.hpp | ||
ImpesTPFAAD.cpp | ||
ImpesTPFAAD.hpp | ||
LinearisedBlackoilResidual.cpp | ||
LinearisedBlackoilResidual.hpp | ||
NewtonIterationBlackoilCPR.cpp | ||
NewtonIterationBlackoilCPR.hpp | ||
NewtonIterationBlackoilInterface.hpp | ||
NewtonIterationBlackoilInterleaved.cpp | ||
NewtonIterationBlackoilInterleaved.hpp | ||
NewtonIterationBlackoilSimple.cpp | ||
NewtonIterationBlackoilSimple.hpp | ||
NewtonIterationUtilities.cpp | ||
NewtonIterationUtilities.hpp | ||
NewtonSolver_impl.hpp | ||
NewtonSolver.hpp | ||
opm-autodiff_doxygen_main.hpp | ||
RateConverter.hpp | ||
RedistributeDataHandles.hpp | ||
SimulatorBase_impl.hpp | ||
SimulatorBase.hpp | ||
SimulatorFullyImplicitBlackoil.hpp | ||
SimulatorFullyImplicitBlackoilOutput.cpp | ||
SimulatorFullyImplicitBlackoilOutput.hpp | ||
SimulatorIncompTwophaseAd.cpp | ||
SimulatorIncompTwophaseAd.hpp | ||
TransportSolverTwophaseAd.cpp | ||
TransportSolverTwophaseAd.hpp | ||
WellDensitySegmented.cpp | ||
WellDensitySegmented.hpp | ||
WellStateFullyImplicitBlackoil.hpp |