LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
lar::standalone::detail Namespace Reference

Functions

template<typename T >
auto make_unique_maybe_default (fhicl::ParameterSet const &pset)
 

Function Documentation

template<typename T >
auto lar::standalone::detail::make_unique_maybe_default ( fhicl::ParameterSet const &  pset)

Definition at line 102 of file StandaloneGeometrySetup.h.

References fhicl::ParameterSet::is_empty().

103  {
104  if (pset.is_empty()) {
105  if constexpr (std::is_constructible_v<T>) { return std::make_unique<T>(); }
106  }
107  return std::make_unique<T>(pset);
108  }