- constexpr, noexcept on various bits
- addition of a 'one::minus' class that returns '-1' instead of '1'.
There are no additional operations defined for this class,
but it can be used in various places to signal alternative behaviour
such as "initialize to a negative or other invalid value"
- This class is largely a pre-C++11 holdover, prior to having movable
references.
- align internals with autoPtr instead of always unconditionally
allocating memory. The valid() method can be used to check for a null
pointer.
- Consolidate into a single file, in anticipation of future removal.
- deprecated MAR-2017
subset(const UList<T>& select, const T& value, const ListType&);
inplaceSubset(const UList<T>& select, const T& value, ListType&);
The subsetList/inplaceSubsetList variants with a unary predicate
provide more flexible and robuster solutions.
- deprecated MAR-2017
initList(const T[mRows]);
initListList(const T[mRows][nColumns]);
Required prior to the addition of constructors with
std::initializer_list
* For most cases, this conversion would be largely unintentional
and also less efficient. If the regex is desirable, the caller
should invoke it explicitly.
For example,
findStrings(regExp(str), listOfStrings);
Or use one of the keyType, wordRe, wordRes variants instead.
If string is to be used as a plain (non-regex) matcher,
this can be directly invoked
findMatchingStrings(str, listOfStrings);
or using the ListOps instead:
findIndices(listOfStrings, str);
* provide function interfaces for keyType.
- subsetList, inplaceSubsetList with optional inverted logic.
- use moveable elements where possible.
- allow optional starting offset for the identity global function.
Eg, 'identity(10, start)' vs 'identity(10) + start'
- more consistent with STL practices for function classes.
- string::hash function class now operates on std::string rather
than Foam::string since we have now avoided inadvertent use of
string conversion from int in more places.
- Eg instead of using labelHashSet, used HashSet<label> which uses
the string::hash for hashing. Other places inadvertently using the
string::hash instead of Hash<label> for hashing.
STYLE: use Map<..> instead of HashTable<.., label, Hash<label>>
- reduces clutter
- add copy construct from UList
- remove copy construct from dissimilar types.
This templated constructor was too generous in what it accepted.
For the special cases where a copy constructor is required with
a change in the data type, now use the createList factory method,
which accepts a unary operator. Eg,
auto scalars = scalarList::createList
(
labels,
[](const label& val){ return 1.5*val; }
);
- now warn about the following:
* the bounding box does not overlap wih the global mesh
* plane does not intersect the (valid) bounding box
* plane does not intersect the global mesh
- add bounding to the "plane" variant of a sampled plane.