@@ -39,8 +39,6 @@ namespace grb {
3939
4040 namespace operators {
4141
42-
43-
4442 /* * Core implementations of the standard operators in #grb::operators. */
4543 namespace internal {
4644
@@ -55,13 +53,14 @@ namespace grb {
5553 * - \b D1: The left-hand input domain.
5654 * - \b D2: The right-hand input domain.
5755 * - \b D3: The output domain, must be convertible to bool.
58- * - \b operator_type : The internal::operator type to negate.
56+ * - \b OperatorType : The internal::operator type to negate.
5957 */
6058 template <
6159 class Op ,
6260 enum Backend implementation = config::default_backend
6361 >
6462 class logical_not {
63+
6564 public:
6665
6766 /* * Alias to the left-hand input data type. */
@@ -74,24 +73,26 @@ namespace grb {
7473 typedef typename Op::D3 result_type;
7574
7675 /* * Whether this operator has an inplace foldl. */
77- static constexpr bool has_foldl = Op::operator_type ::has_foldl;
76+ static constexpr bool has_foldl = Op::OperatorType ::has_foldl;
7877
7978 /* * Whether this operator has an inplace foldr. */
80- static constexpr bool has_foldr = Op::operator_type ::has_foldr;
79+ static constexpr bool has_foldr = Op::OperatorType ::has_foldr;
8180
8281 /* *
8382 * Whether this operator is \em mathematically associative; that is,
8483 * associative when assuming equivalent data types for \a IN1, \a IN2,
8584 * and \a OUT, as well as assuming exact arithmetic, no overflows, etc.
8685 */
87- static constexpr bool is_associative = Op::operator_type::is_associative;
86+ static constexpr bool is_associative = is_lnegated< Op >::value
87+ ? Op::OperatorType::is_associative
88+ : false ;
8889
8990 /* *
9091 * Whether this operator is \em mathematically commutative; that is,
9192 * commutative when assuming equivalent data types for \a IN1, \a IN2,
9293 * and \a OUT, as well as assuming exact arithmetic, no overflows, etc.
9394 */
94- static constexpr bool is_commutative = Op::operator_type ::is_commutative;
95+ static constexpr bool is_commutative = Op::OperatorType ::is_commutative;
9596
9697 /* *
9798 * Out-of-place application of the operator.
@@ -111,10 +112,8 @@ namespace grb {
111112 void
112113 >::type * = nullptr
113114 ) {
114-
115- Op::operator_type::apply ( a, b, c );
115+ Op::OperatorType::apply ( a, b, c );
116116 *c = !*c;
117-
118117 }
119118
120119 /* *
@@ -132,10 +131,8 @@ namespace grb {
132131 void
133132 >::type * = nullptr
134133 ) {
135-
136- Op::operator_type::foldr ( a, c );
134+ Op::OperatorType::foldr ( a, c );
137135 *c = !*c;
138-
139136 }
140137
141138 /* *
@@ -153,10 +150,8 @@ namespace grb {
153150 void
154151 >::type * = nullptr
155152 ) {
156-
157- Op::operator_type::foldl ( c, b );
153+ Op::OperatorType::foldl ( c, b );
158154 *c = !*c;
159-
160155 }
161156 };
162157
@@ -4298,7 +4293,7 @@ namespace grb {
42984293 typedef typename OperatorBase< OP >::D3 D3;
42994294
43004295 /* * The type of the operator OP. */
4301- typedef OP operator_type ;
4296+ typedef OP OperatorType ;
43024297
43034298 /* *
43044299 * Reduces a vector of type \a InputType into a value in \a IOType
0 commit comments