Skip to content

Commit 596b777

Browse files
Deprecate thrust logical meta functions (#3538)
1 parent 1763c93 commit 596b777

File tree

1 file changed

+10
-47
lines changed

1 file changed

+10
-47
lines changed

thrust/thrust/type_traits/logical_metafunctions.h

+10-47
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@
3232

3333
THRUST_NAMESPACE_BEGIN
3434

35-
//! \addtogroup utility
36-
//! \{
37-
//! \addtogroup type_traits Type Traits
38-
//! \{
39-
4035
using ::cuda::std::conjunction;
4136
using ::cuda::std::disjunction;
4237
using ::cuda::std::negation;
@@ -46,64 +41,32 @@ using ::cuda::std::disjunction_v;
4641
using ::cuda::std::negation_v;
4742
#endif // !_CCCL_NO_VARIABLE_TEMPLATES
4843

49-
//! \brief <a href="https://en.cppreference.com/w/cpp/types/integral_constant"><tt>std::integral_constant</tt></a>
50-
//! whose value is <tt>(... && Bs)</tt>.
51-
//!
52-
//! \see conjunction_value_v
53-
//! \see conjunction
54-
//! \see <a href="https://en.cppreference.com/w/cpp/types/conjunction"><tt>std::conjunction</tt></a>
5544
template <bool... Bs>
56-
using conjunction_value = conjunction<::cuda::std::bool_constant<Bs>...>;
45+
using conjunction_value CCCL_DEPRECATED_BECAUSE("Use: cuda::std::bool_constant<(Bs && ...)>") =
46+
conjunction<::cuda::std::bool_constant<Bs>...>;
5747

5848
#if _CCCL_STD_VER >= 2014
59-
//! \brief <tt>constexpr bool</tt> whose value is <tt>(... && Bs)</tt>.
60-
//!
61-
//! \see conjunction_value
62-
//! \see conjunction
63-
//! \see <a href="https://en.cppreference.com/w/cpp/types/conjunction"><tt>std::conjunction</tt></a>
6449
template <bool... Bs>
65-
constexpr bool conjunction_value_v = conjunction_value<Bs...>::value;
50+
constexpr bool
51+
conjunction_value_v CCCL_DEPRECATED_BECAUSE("Use a fold expression: Bs && ...") = conjunction_value<Bs...>::value;
6652
#endif
6753

68-
//! \brief <a href="https://en.cppreference.com/w/cpp/types/integral_constant"><tt>std::integral_constant</tt></a>
69-
//! whose value is <tt>(... || Bs)</tt>.
70-
//!
71-
//! \see disjunction_value_v
72-
//! \see disjunction
73-
//! \see <a href="https://en.cppreference.com/w/cpp/types/disjunction"><tt>std::disjunction</tt></a>
7454
template <bool... Bs>
75-
using disjunction_value = disjunction<::cuda::std::bool_constant<Bs>...>;
55+
using disjunction_value CCCL_DEPRECATED_BECAUSE("Use: cuda::std::bool_constant<(Bs || ...)>") =
56+
disjunction<::cuda::std::bool_constant<Bs>...>;
7657

7758
#if _CCCL_STD_VER >= 2014
78-
//! \brief <tt>constexpr bool</tt> whose value is <tt>(... || Bs)</tt>.
79-
//!
80-
//! \see disjunction_value
81-
//! \see disjunction
82-
//! \see <a href="https://en.cppreference.com/w/cpp/types/disjunction"><tt>std::disjunction</tt></a>
8359
template <bool... Bs>
84-
constexpr bool disjunction_value_v = disjunction_value<Bs...>::value;
60+
constexpr bool
61+
disjunction_value_v CCCL_DEPRECATED_BECAUSE("Use a fold expression: Bs || ...") = disjunction_value<Bs...>::value;
8562
#endif
8663

87-
//! \brief <a href="https://en.cppreference.com/w/cpp/types/integral_constant"><tt>std::integral_constant</tt></a>
88-
//! whose value is <tt>!Bs</tt>.
89-
//!
90-
//! \see negation_value_v
91-
//! \see negation
92-
//! \see <a href="https://en.cppreference.com/w/cpp/types/negation"><tt>std::negation</tt></a>
9364
template <bool B>
94-
using negation_value = ::cuda::std::bool_constant<!B>;
65+
using negation_value CCCL_DEPRECATED_BECAUSE("Use cuda::std::bool_constant<!B>") = ::cuda::std::bool_constant<!B>;
9566

9667
#if _CCCL_STD_VER >= 2014
97-
//! \brief <tt>constexpr bool</tt> whose value is <tt>!Ts::value</tt>.
98-
//!
99-
//! \see negation_value
100-
//! \see negation
101-
//! \see <a href="https://en.cppreference.com/w/cpp/types/negation"><tt>std::negation</tt></a>
10268
template <bool B>
103-
constexpr bool negation_value_v = negation_value<B>::value;
69+
constexpr bool negation_value_v CCCL_DEPRECATED_BECAUSE("Use a plain negation !B") = negation_value<B>::value;
10470
#endif
10571

106-
//! \} // type traits
107-
//! \} // utility
108-
10972
THRUST_NAMESPACE_END

0 commit comments

Comments
 (0)