mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use std::is_arithmetic in contiguous and ListPolicy
This commit is contained in:
committed by
Andrew Heather
parent
1d5e0a4e0e
commit
c96a84e653
@ -71,15 +71,7 @@ struct short_length : std::integral_constant<label,10> {};
|
||||
// Default definition: (integral | floating-point) are contiguous and thus
|
||||
// never need any line breaks
|
||||
template<class T>
|
||||
struct no_linebreak
|
||||
:
|
||||
std::integral_constant
|
||||
<
|
||||
bool,
|
||||
std::is_integral<T>::value || std::is_floating_point<T>::value
|
||||
>
|
||||
{};
|
||||
|
||||
struct no_linebreak : std::is_arithmetic<T> {};
|
||||
|
||||
// Specialization for word, wordRe, keyType
|
||||
// These elements are normally fairly short, so ok to output a few (eg, 10)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -45,7 +45,7 @@ Description
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
// Forward Declarations
|
||||
template<class T, unsigned N> class FixedList;
|
||||
template<class T> class Pair;
|
||||
|
||||
@ -55,12 +55,7 @@ template<class T> class Pair;
|
||||
template<class T>
|
||||
inline bool contiguous()
|
||||
{
|
||||
return
|
||||
std::integral_constant
|
||||
<
|
||||
bool,
|
||||
std::is_integral<T>::value || std::is_floating_point<T>::value
|
||||
>::value;
|
||||
return std::is_arithmetic<T>::value;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user