Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] error: reference to 'queue' is ambiguous #2690

Open
yurivict opened this issue Apr 15, 2024 · 6 comments · May be fixed by #2751
Open

[BUG] error: reference to 'queue' is ambiguous #2690

yurivict opened this issue Apr 15, 2024 · 6 comments · May be fixed by #2751
Labels
bug dont-close This issue/pull request shouldn't be closed

Comments

@yurivict
Copy link

Description

/wrkdirs/usr/ports/math/the-algorithms-c++/work/C-Plus-Plus-2dadbf7/data_structures/queue_using_array2.cpp:12:9: error: reference to 'queue' is ambiguous
   12 |         queue[rear++] = x;
      |         ^
/wrkdirs/usr/ports/math/the-algorithms-c++/work/C-Plus-Plus-2dadbf7/data_structures/queue_using_array2.cpp:4:5: note: candidate found by name lookup is 'queue'
    4 | int queue[10];
      |     ^
/usr/include/c++/v1/queue:301:28: note: candidate found by name lookup is 'std::queue'
  301 | class _LIBCPP_TEMPLATE_VIS queue {
      |                            ^
/wrkdirs/usr/ports/math/the-algorithms-c++/work/C-Plus-Plus-2dadbf7/data_structures/queue_using_array2.cpp:22:25: error: reference to 'queue' is ambiguous
   22 |         cout << "\n" << queue[front++] << " deleted";
      |                         ^
/wrkdirs/usr/ports/math/the-algorithms-c++/work/C-Plus-Plus-2dadbf7/data_structures/queue_using_array2.cpp:4:5: note: candidate found by name lookup is 'queue'
    4 | int queue[10];
      |     ^
/usr/include/c++/v1/queue:301:28: note: candidate found by name lookup is 'std::queue'
  301 | class _LIBCPP_TEMPLATE_VIS queue {
      |                            ^

Expected behavior

n/a

Actual behavior

See above.

Steps to reproduce

No response

Context

revision: 2dadbf7

FreeBSD 14.0

Additional information

No response

Copy link
Contributor

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label May 16, 2024
@yurivict
Copy link
Author

not stale

@github-actions github-actions bot removed the stale Author has not responded to the comments for over 2 weeks label Jul 26, 2024
Anm01Chandel added a commit to Anm01Chandel/C-Plus-Plus that referenced this issue Jul 26, 2024
Copy link
Contributor

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label Aug 25, 2024
@realstealthninja realstealthninja added dont-close This issue/pull request shouldn't be closed and removed stale Author has not responded to the comments for over 2 weeks labels Aug 26, 2024
@realstealthninja
Copy link
Collaborator

@Anmol3299 could you open a pr

@realstealthninja
Copy link
Collaborator

the solution is not to rename queue but remove using namespace std

@FuelTheBurn
Copy link

Can I take this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dont-close This issue/pull request shouldn't be closed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants