35#include <initializer_list>
44#if (__cplusplus >= 201402L)
45# define FOAM_DEPRECATED(since) [[deprecated("Since " #since)]]
46# define FOAM_DEPRECATED_FOR(since, replacement) [[deprecated("Since " #since "; use " #replacement)]]
47#elif defined(__GNUC__)
48# define FOAM_DEPRECATED(since) __attribute__((__deprecated__("Since " #since)))
49# define FOAM_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement)))
51# define FOAM_DEPRECATED(since)
52# define FOAM_DEPRECATED_FOR(since, replacement)
82 return std::forward<T>(val);
101template<
class T,
size_t N>
104 for (
size_t i = 0; i <
N; ++i)
134constexpr auto begin(
C& c) ->
decltype(c.begin())
142constexpr auto begin(
const C& c) ->
decltype(c.begin())
150constexpr auto cbegin(
const C& c) ->
decltype(c.begin())
158constexpr auto end(
C& c) ->
decltype(c.end())
166constexpr auto end(
const C& c) ->
decltype(c.end())
174constexpr auto cend(
const C& c) ->
decltype(c.end())
185constexpr auto rbegin(
C& c) ->
decltype(c.rbegin())
193constexpr auto rbegin(
const C& c) ->
decltype(c.rbegin())
201constexpr auto crbegin(
const C& c) ->
decltype(c.rbegin())
209constexpr auto rend(
C& c) ->
decltype(c.rend())
217constexpr auto rend(
const C& c) ->
decltype(c.rend())
225constexpr auto crend(
const C& c) ->
decltype(c.rend())
233constexpr inline const T&
min(
const T& a,
const T&
b)
235 return (
b < a) ?
b : a;
241constexpr inline const T&
max(
const T& a,
const T&
b)
243 return (a <
b) ?
b : a;
260#define forAllIters(container,iter) \
263 auto iter = stdFoam::begin(container); \
264 iter != stdFoam::end(container); \
278#define forAllConstIters(container,iter) \
281 auto iter = stdFoam::cbegin(container); \
282 iter != stdFoam::cend(container); \
297#define forAllReverseIters(container,iter) \
300 auto iter = stdFoam::rbegin(container); \
301 iter != stdFoam::rend(container); \
315#define forAllConstReverseIters(container,iter) \
318 auto iter = stdFoam::crbegin(container); \
319 iter != stdFoam::crend(container); \
333#define forAll(list, i) \
334 for (Foam::label i=0; i<(list).size(); ++i)
346#define forAllReverse(list, i) \
347 for (Foam::label i=(list).size()-1; i>=0; --i)
362#define forAllIter(Container,container,iter) \
365 Container::iterator iter = (container).begin(); \
366 iter != (container).end(); \
381#define forAllConstIter(Container,container,iter) \
384 Container::const_iterator iter = (container).cbegin(); \
385 iter != (container).cend(); \
static const Foam::dimensionedScalar C("", Foam::dimTemperature, 234.5)
void Swap(DynamicList< T, SizeMinA > &a, DynamicList< T, SizeMinB > &b)
constexpr auto cend(const C &c) -> decltype(c.end())
Return const_iterator to the end of the container c.
constexpr auto crbegin(const C &c) -> decltype(c.rbegin())
Return const_reverse_iterator to the reverse-begin of container c.
constexpr const T & min(const T &a, const T &b)
Return the lesser of the parameters.
constexpr const T & max(const T &a, const T &b)
Return the greater of the parameters.
constexpr auto crend(const C &c) -> decltype(c.rend())
Return const_reverse_iterator to reverse-end of container c.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
constexpr auto rbegin(C &c) -> decltype(c.rbegin())
Return reverse_iterator to the reverse-begin of container c.
constexpr auto cbegin(const C &c) -> decltype(c.begin())
Return const_iterator to the beginning of the container c.
constexpr auto rend(C &c) -> decltype(c.rend())
Return reverse_iterator to reverse-end of container c.
constexpr auto begin(C &c) -> decltype(c.begin())
Return iterator to the beginning of the container c.
#define forAllConstReverseIters(container, iter)
Reverse iterate across elements of container object with const access.
#define forAll(list, i)
Loop across all elements in list.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
#define forAllReverseIters(container, iter)
Reverse iterate across elements in the container object of type.
#define forAllIters(container, iter)
Iterate across all elements in the container object.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.
constexpr T && operator()(T &&val) const noexcept
const Vector< label > N(dict.get< Vector< label > >("N"))