add dispatch tags
for some places such as
refPtr it would be useful to support construct read/write as well as construct read-only. However, there is no convenient or reliable means to do so.
volScalarField fld(...); refPtr someRef(fld);
Should this be a const reference or a non-const reference? Currently we only have construct from const-ref since relying on the constness of the supplied argument is fragile at best, or simply wrong.
Propose adding a tagged dispatch constructor. Eg,
//- Construct for a non-const reference to an object. inline refPtr(T& obj, stdFoam::output_t) noexcept;
I think that
output_t might be reasonable enough names (vs read/write) that might be possibly to use elsewhere as well. Would declare in stdFoam.H to make globally available.