Helper template function for computing set unions. Ensures that elements of a take precedence. For example, if
a = {{1, 2}, {3, 4}} b = {{1, 4}, {5, 6}}
combine(a, b) will use the pair {1, 2} from a, not {1, 4} from b.
This behavior relies on the fact that std::map::insert({a, b}) is a no-op if a key equivalent to a is already present.
This is similar to a set union, but it is not symmetric. (I would expect set_union(a, b) to be the same as set_union(b, a)).
Definition at line 95 of file pism_utilities.hh.
Referenced by pism::MohrCoulombYieldStress::diagnostics_impl(), pism::OptTillphiYieldStress::diagnostics_impl(), pism::atmosphere::AtmosphereModel::diagnostics_impl(), pism::frontalmelt::FrontalMelt::diagnostics_impl(), pism::ocean::Pico::diagnostics_impl(), pism::ocean::OceanModel::diagnostics_impl(), pism::ocean::sea_level::SeaLevel::diagnostics_impl(), pism::surface::DEBMSimple::diagnostics_impl(), pism::surface::NoGLRetreat::diagnostics_impl(), pism::surface::TemperatureIndex::diagnostics_impl(), pism::surface::SurfaceModel::diagnostics_impl(), pism::bed::LingleClark::diagnostics_impl(), pism::hydrology::Routing::diagnostics_impl(), pism::hydrology::SteadyState::diagnostics_impl(), pism::RegionalYieldStress::diagnostics_impl(), pism::stressbalance::StressBalance::diagnostics_impl(), pism::IceModel::init_diagnostics(), pism::IceModel::prune_diagnostics(), pism::surface::SurfaceModel::ts_diagnostics_impl(), and pism::stressbalance::StressBalance::ts_diagnostics_impl().