[BUG] error: reference to 'queue' is ambiguous
yurivict opened this issue · 9 comments
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
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.
not stale
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.
@Anmol3299 could you open a pr
the solution is not to rename queue but remove using namespace std
Can I take this?
Assign me to this issue so that I can help out to fix this.✌
Please assign this to me! I will definitely help.
hey @alucard017 and @Nandinig24 I love your enthusiasm but three is a pr which fixes this already! thanks for the concern. If you'd like you can check out #2456 and create a pr for one of the algorithms listed there!