Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Template parameter name conflict with termios.h macro definition #1547

Closed
PhilipDeegan opened this issue Oct 25, 2021 · 3 comments · Fixed by #1548
Closed

Template parameter name conflict with termios.h macro definition #1547

PhilipDeegan opened this issue Oct 25, 2021 · 3 comments · Fixed by #1548
Labels
P1: should have Necessary, but not critical. type: bug: functional Does not work as intended.
Milestone

Comments

@PhilipDeegan
Copy link
Contributor

template <bool B0, bool... BN>

/usr/local/cuda-11.4/include/thrust/type_traits/logical_metafunctions.h:135:16: error: expected ',' or '>' in template-parameter-list
template <bool B0, bool... BN>
               ^
/usr/include/bits/termios.h:121:13: note: expanded from macro 'B0'
#define  B0     0000000         /* hang up */

I ran into this in my own code not that long.
Happy to make a PR with whatever replacement is chosen.
This file is the only place where "B0" occurs like this

reference: https://man7.org/linux/man-pages/man3/termios.3.html

@alliepiper
Copy link
Collaborator

A PR is absolutely welcome -- I'd accept one with anything reasonable, maybe B -> V for value?

@alliepiper alliepiper added this to the 1.16.0 milestone Oct 25, 2021
@alliepiper alliepiper added type: bug: functional Does not work as intended. P1: should have Necessary, but not critical. labels Oct 25, 2021
@PhilipDeegan
Copy link
Contributor Author

considering


and

how about

template <bool B, bool... Bs>
struct disjunction_value<B, Bs...>
  : std::integral_constant<bool, B || disjunction_value<Bs...>::value> {};

?

alliepiper added a commit that referenced this issue Oct 26, 2021
update type_traits/logical_metafunctions.h #1547
alliepiper pushed a commit that referenced this issue Oct 27, 2021
This is to avoid namespace conflict with termios.h definition of macro "B0"
@alliepiper
Copy link
Collaborator

Fixed by #1548.

@alliepiper alliepiper modified the milestones: 1.16.0, 1.15.0 Nov 12, 2021
@alliepiper alliepiper linked a pull request Nov 12, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1: should have Necessary, but not critical. type: bug: functional Does not work as intended.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants