Skip to content
Snippets Groups Projects
Commit c96a84e6 authored by Mark OLESEN's avatar Mark OLESEN Committed by Andrew Heather
Browse files

STYLE: use std::is_arithmetic in contiguous and ListPolicy

parent 1d5e0a4e
Branches
Tags
No related merge requests found
......@@ -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;
}
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment