Skip to content

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

Open
@yurivict

Description

@yurivict

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdont-closeThis issue/pull request shouldn't be closed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions