This bugzilla service is closed. All entries have been migrated to
Bug 272 - Boolean operators & | !
Summary: Boolean operators & | !
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - vectorization (show other bugs)
Version: 3.0
Hardware: All All
: Normal enhancement
Assignee: Nobody
Depends on:
Blocks: 585
  Show dependency treegraph
Reported: 2011-05-18 12:42 UTC by Marton Danoczy
Modified: 2019-12-04 10:45 UTC (History)
5 users (show)


Description Marton Danoczy 2011-05-18 12:42:11 UTC

unfortunately, it is not possible to use boolean operators on boolean expressions. It would be great to allow something such as:

x = (x>0 & y>0).select(x, 0);  // or &&?

This issue can be worked around by:

x = (y>0).select((x>0).select(x, 0), 0);

but adding boolean operators would make code a lot more readable. Or maybe even faster?

(possibly blocks or is blocked by bug 97)
Comment 1 Gael Guennebaud 2013-06-10 21:17:24 UTC
This is possible since this 2 years old commit:
Comment 2 Marton Danoczy 2013-06-24 09:21:12 UTC
Sorry for the late answer, the notification was filtered out as spam.

I see, thanks. Isn't using the short-circuit operators confusing here? That's why I didn't find this functionality, since I didn't expect && to be used for something that doesn't short-circuit.
Comment 3 Nobody 2019-12-04 10:45:58 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance:

Note You need to log in before you can comment on or make changes to this bug.