Skip to content

Commit 1089342

Browse files
authored
Remove deprecated constexpr definitions (#2863)
# Checklist - [X] The title and commit message(s) are descriptive. - [X] Small commits made to fix your PR have been squashed to avoid history pollution. - [X] Tests have been added for new features or bug fixes. - [X] API of new functions and classes are documented. # Description C++17 compiler is required now, so these lines are unnecessary.
1 parent f115228 commit 1089342

File tree

3 files changed

+0
-47
lines changed

3 files changed

+0
-47
lines changed

include/xtensor/containers/xfixed.hpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -381,21 +381,6 @@ namespace xt
381381
friend class xcontainer<xfixed_container<ET, S, L, SH, Tag>>;
382382
};
383383

384-
#ifdef XTENSOR_HAS_CONSTEXPR_ENHANCED
385-
// Out of line definitions to prevent linker errors prior to C++17
386-
template <class ET, class S, layout_type L, bool SH, class Tag>
387-
constexpr
388-
typename xfixed_container<ET, S, L, SH, Tag>::inner_shape_type xfixed_container<ET, S, L, SH, Tag>::m_shape;
389-
390-
template <class ET, class S, layout_type L, bool SH, class Tag>
391-
constexpr
392-
typename xfixed_container<ET, S, L, SH, Tag>::inner_strides_type xfixed_container<ET, S, L, SH, Tag>::m_strides;
393-
394-
template <class ET, class S, layout_type L, bool SH, class Tag>
395-
constexpr typename xfixed_container<ET, S, L, SH, Tag>::inner_backstrides_type
396-
xfixed_container<ET, S, L, SH, Tag>::m_backstrides;
397-
#endif
398-
399384
/****************************************
400385
* xfixed_container_adaptor declaration *
401386
****************************************/
@@ -518,21 +503,6 @@ namespace xt
518503
friend class xcontainer<xfixed_adaptor<EC, S, L, SH, Tag>>;
519504
};
520505

521-
#ifdef XTENSOR_HAS_CONSTEXPR_ENHANCED
522-
// Out of line definitions to prevent linker errors prior to C++17
523-
template <class EC, class S, layout_type L, bool SH, class Tag>
524-
constexpr
525-
typename xfixed_adaptor<EC, S, L, SH, Tag>::inner_shape_type xfixed_adaptor<EC, S, L, SH, Tag>::m_shape;
526-
527-
template <class EC, class S, layout_type L, bool SH, class Tag>
528-
constexpr
529-
typename xfixed_adaptor<EC, S, L, SH, Tag>::inner_strides_type xfixed_adaptor<EC, S, L, SH, Tag>::m_strides;
530-
531-
template <class EC, class S, layout_type L, bool SH, class Tag>
532-
constexpr typename xfixed_adaptor<EC, S, L, SH, Tag>::inner_backstrides_type
533-
xfixed_adaptor<EC, S, L, SH, Tag>::m_backstrides;
534-
#endif
535-
536506
/************************************
537507
* xfixed_container implementation *
538508
************************************/

include/xtensor/containers/xstorage.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,11 +1731,6 @@ namespace xt
17311731
XTENSOR_CONSTEXPR_ENHANCED_STATIC cast_type m_array = cast_type({X...});
17321732
};
17331733

1734-
#ifdef XTENSOR_HAS_CONSTEXPR_ENHANCED
1735-
template <std::size_t... X>
1736-
constexpr typename fixed_shape<X...>::cast_type fixed_shape<X...>::m_array;
1737-
#endif
1738-
17391734
#undef XTENSOR_FIXED_SHAPE_CONSTEXPR
17401735

17411736
template <class E, std::ptrdiff_t Start, std::ptrdiff_t End = -1>

include/xtensor/core/xfunction.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,6 @@ namespace xt
6767
XTENSOR_CONSTEXPR_ENHANCED_STATIC bool is_initialized = true;
6868
};
6969

70-
#ifdef XTENSOR_HAS_CONSTEXPR_ENHANCED
71-
// Out of line definitions to prevent linker errors prior to C++17
72-
template <std::size_t... N, class is_shape_trivial>
73-
constexpr fixed_shape<N...> xfunction_cache_impl<fixed_shape<N...>, is_shape_trivial>::shape;
74-
75-
template <std::size_t... N, class is_shape_trivial>
76-
constexpr bool xfunction_cache_impl<fixed_shape<N...>, is_shape_trivial>::is_trivial;
77-
78-
template <std::size_t... N, class is_shape_trivial>
79-
constexpr bool xfunction_cache_impl<fixed_shape<N...>, is_shape_trivial>::is_initialized;
80-
#endif
81-
8270
template <class... CT>
8371
struct xfunction_bool_load_type
8472
{

0 commit comments

Comments
 (0)