@@ -1523,7 +1523,7 @@ constexpr bool is_union(Type::type type_id) {
15231523// /
15241524// / For Type::FIXED_SIZE_BINARY, you will instead need to inspect the concrete
15251525// / DataType to get this information.
1526- static inline int bit_width (Type::type type_id) {
1526+ constexpr int bit_width (Type::type type_id) {
15271527 switch (type_id) {
15281528 case Type::BOOL :
15291529 return 1 ;
@@ -1579,7 +1579,7 @@ static inline int bit_width(Type::type type_id) {
15791579// /
15801580// / \param[in] type_id the type-id to check
15811581// / \return the offsets bit width, or 0 if the type does not have offsets
1582- static inline int offset_bit_width (Type::type type_id) {
1582+ constexpr int offset_bit_width (Type::type type_id) {
15831583 switch (type_id) {
15841584 case Type::STRING :
15851585 case Type::BINARY :
@@ -1628,15 +1628,15 @@ int RequiredValueAlignmentForBuffer(Type::type type_id, int buffer_index);
16281628// / \return whether type is an integer type
16291629// /
16301630// / Convenience for checking using the type's id
1631- static inline bool is_integer (const DataType& type) { return is_integer (type.id ()); }
1631+ constexpr bool is_integer (const DataType& type) { return is_integer (type.id ()); }
16321632
16331633// / \brief Check for a signed integer type
16341634// /
16351635// / \param[in] type the type to check
16361636// / \return whether type is a signed integer type
16371637// /
16381638// / Convenience for checking using the type's id
1639- static inline bool is_signed_integer (const DataType& type) {
1639+ constexpr bool is_signed_integer (const DataType& type) {
16401640 return is_signed_integer (type.id ());
16411641}
16421642
@@ -1646,7 +1646,7 @@ static inline bool is_signed_integer(const DataType& type) {
16461646// / \return whether type is an unsigned integer type
16471647// /
16481648// / Convenience for checking using the type's id
1649- static inline bool is_unsigned_integer (const DataType& type) {
1649+ constexpr bool is_unsigned_integer (const DataType& type) {
16501650 return is_unsigned_integer (type.id ());
16511651}
16521652
@@ -1656,39 +1656,39 @@ static inline bool is_unsigned_integer(const DataType& type) {
16561656// / \return whether type is a floating point type
16571657// /
16581658// / Convenience for checking using the type's id
1659- static inline bool is_floating (const DataType& type) { return is_floating (type.id ()); }
1659+ constexpr bool is_floating (const DataType& type) { return is_floating (type.id ()); }
16601660
16611661// / \brief Check for a numeric type (number except boolean type)
16621662// /
16631663// / \param[in] type the type to check
16641664// / \return whether type is a numeric type
16651665// /
16661666// / Convenience for checking using the type's id
1667- static inline bool is_numeric (const DataType& type) { return is_numeric (type.id ()); }
1667+ constexpr bool is_numeric (const DataType& type) { return is_numeric (type.id ()); }
16681668
16691669// / \brief Check for a decimal type
16701670// /
16711671// / \param[in] type the type to check
16721672// / \return whether type is a decimal type
16731673// /
16741674// / Convenience for checking using the type's id
1675- static inline bool is_decimal (const DataType& type) { return is_decimal (type.id ()); }
1675+ constexpr bool is_decimal (const DataType& type) { return is_decimal (type.id ()); }
16761676
16771677// / \brief Check for a primitive type
16781678// /
16791679// / \param[in] type the type to check
16801680// / \return whether type is a primitive type
16811681// /
16821682// / Convenience for checking using the type's id
1683- static inline bool is_primitive (const DataType& type) { return is_primitive (type.id ()); }
1683+ constexpr bool is_primitive (const DataType& type) { return is_primitive (type.id ()); }
16841684
16851685// / \brief Check for a binary or string-like type (except fixed-size binary)
16861686// /
16871687// / \param[in] type the type to check
16881688// / \return whether type is a binary or string-like type
16891689// /
16901690// / Convenience for checking using the type's id
1691- static inline bool is_base_binary_like (const DataType& type) {
1691+ constexpr bool is_base_binary_like (const DataType& type) {
16921692 return is_base_binary_like (type.id ());
16931693}
16941694
@@ -1698,17 +1698,15 @@ static inline bool is_base_binary_like(const DataType& type) {
16981698// / \return whether type is a binary-like type
16991699// /
17001700// / Convenience for checking using the type's id
1701- static inline bool is_binary_like (const DataType& type) {
1702- return is_binary_like (type.id ());
1703- }
1701+ constexpr bool is_binary_like (const DataType& type) { return is_binary_like (type.id ()); }
17041702
17051703// / \brief Check for a large-binary-like type
17061704// /
17071705// / \param[in] type the type to check
17081706// / \return whether type is a large-binary-like type
17091707// /
17101708// / Convenience for checking using the type's id
1711- static inline bool is_large_binary_like (const DataType& type) {
1709+ constexpr bool is_large_binary_like (const DataType& type) {
17121710 return is_large_binary_like (type.id ());
17131711}
17141712
@@ -1718,23 +1716,23 @@ static inline bool is_large_binary_like(const DataType& type) {
17181716// / \return whether type is a binary type
17191717// /
17201718// / Convenience for checking using the type's id
1721- static inline bool is_binary (const DataType& type) { return is_binary (type.id ()); }
1719+ constexpr bool is_binary (const DataType& type) { return is_binary (type.id ()); }
17221720
17231721// / \brief Check for a string type
17241722// /
17251723// / \param[in] type the type to check
17261724// / \return whether type is a string type
17271725// /
17281726// / Convenience for checking using the type's id
1729- static inline bool is_string (const DataType& type) { return is_string (type.id ()); }
1727+ constexpr bool is_string (const DataType& type) { return is_string (type.id ()); }
17301728
17311729// / \brief Check for a binary-view-like type
17321730// /
17331731// / \param[in] type the type to check
17341732// / \return whether type is a binary-view-like type
17351733// /
17361734// / Convenience for checking using the type's id
1737- static inline bool is_binary_view_like (const DataType& type) {
1735+ constexpr bool is_binary_view_like (const DataType& type) {
17381736 return is_binary_view_like (type.id ());
17391737}
17401738
@@ -1744,33 +1742,31 @@ static inline bool is_binary_view_like(const DataType& type) {
17441742// / \return whether type is a temporal type
17451743// /
17461744// / Convenience for checking using the type's id
1747- static inline bool is_temporal (const DataType& type) { return is_temporal (type.id ()); }
1745+ constexpr bool is_temporal (const DataType& type) { return is_temporal (type.id ()); }
17481746
17491747// / \brief Check for an interval type
17501748// /
17511749// / \param[in] type the type to check
17521750// / \return whether type is a interval type
17531751// /
17541752// / Convenience for checking using the type's id
1755- static inline bool is_interval (const DataType& type) { return is_interval (type.id ()); }
1753+ constexpr bool is_interval (const DataType& type) { return is_interval (type.id ()); }
17561754
17571755// / \brief Check for a dictionary type
17581756// /
17591757// / \param[in] type the type to check
17601758// / \return whether type is a dictionary type
17611759// /
17621760// / Convenience for checking using the type's id
1763- static inline bool is_dictionary (const DataType& type) {
1764- return is_dictionary (type.id ());
1765- }
1761+ constexpr bool is_dictionary (const DataType& type) { return is_dictionary (type.id ()); }
17661762
17671763// / \brief Check for a fixed-size-binary type
17681764// /
17691765// / \param[in] type the type to check
17701766// / \return whether type is a fixed-size-binary type
17711767// /
17721768// / Convenience for checking using the type's id
1773- static inline bool is_fixed_size_binary (const DataType& type) {
1769+ constexpr bool is_fixed_size_binary (const DataType& type) {
17741770 return is_fixed_size_binary (type.id ());
17751771}
17761772
@@ -1780,17 +1776,15 @@ static inline bool is_fixed_size_binary(const DataType& type) {
17801776// / \return whether type is a fixed-width type
17811777// /
17821778// / Convenience for checking using the type's id
1783- static inline bool is_fixed_width (const DataType& type) {
1784- return is_fixed_width (type.id ());
1785- }
1779+ constexpr bool is_fixed_width (const DataType& type) { return is_fixed_width (type.id ()); }
17861780
17871781// / \brief Check for a variable-length list type
17881782// /
17891783// / \param[in] type the type to check
17901784// / \return whether type is a variable-length list type
17911785// /
17921786// / Convenience for checking using the type's id
1793- static inline bool is_var_length_list (const DataType& type) {
1787+ constexpr bool is_var_length_list (const DataType& type) {
17941788 return is_var_length_list (type.id ());
17951789}
17961790
@@ -1800,15 +1794,15 @@ static inline bool is_var_length_list(const DataType& type) {
18001794// / \return whether type is a list-like type
18011795// /
18021796// / Convenience for checking using the type's id
1803- static inline bool is_list_like (const DataType& type) { return is_list_like (type.id ()); }
1797+ constexpr bool is_list_like (const DataType& type) { return is_list_like (type.id ()); }
18041798
18051799// / \brief Check for a var-length list or list-view like type
18061800// /
18071801// / \param[in] type the type to check
18081802// / \return whether type is a var-length list or list-view like type
18091803// /
18101804// / Convenience for checking using the type's id
1811- static inline bool is_var_length_list_like (const DataType& type) {
1805+ constexpr bool is_var_length_list_like (const DataType& type) {
18121806 return is_var_length_list_like (type.id ());
18131807}
18141808
@@ -1818,23 +1812,23 @@ static inline bool is_var_length_list_like(const DataType& type) {
18181812// / \return whether type is a list-view type
18191813// /
18201814// / Convenience for checking using the type's id
1821- static inline bool is_list_view (const DataType& type) { return is_list_view (type.id ()); }
1815+ constexpr bool is_list_view (const DataType& type) { return is_list_view (type.id ()); }
18221816
18231817// / \brief Check for a nested type
18241818// /
18251819// / \param[in] type the type to check
18261820// / \return whether type is a nested type
18271821// /
18281822// / Convenience for checking using the type's id
1829- static inline bool is_nested (const DataType& type) { return is_nested (type.id ()); }
1823+ constexpr bool is_nested (const DataType& type) { return is_nested (type.id ()); }
18301824
18311825// / \brief Check for a union type
18321826// /
18331827// / \param[in] type the type to check
18341828// / \return whether type is a union type
18351829// /
18361830// / Convenience for checking using the type's id
1837- static inline bool is_union (const DataType& type) { return is_union (type.id ()); }
1831+ constexpr bool is_union (const DataType& type) { return is_union (type.id ()); }
18381832
18391833// / @}
18401834
0 commit comments