[SERVER-35784] Fix ambiguously named test fixture in `commands_test.cpp` Created: 25/Jun/18  Updated: 29/Oct/23  Resolved: 26/Jun/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.3, 4.1.1

Type: Bug Priority: Major - P3
Reporter: ADAM Martin (Inactive) Assignee: ADAM Martin (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-34798 Replace subclasses of ServiceContext ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2018-07-02
Participants:
Linked BF Score: 61

 Description   

Microsoft's compilers that do not properly support 2-phase lookup seem to trip over an ambiguity between:

`namespace mongo { class TypedCommand; }`

and

`namespace mongo { namespace{ class TypedCommand; }}`,

when the second is defined and declared after the definition the template which would use the first (non-anonymous) instance.



 Comments   
Comment by Githook User [ 14/Sep/18 ]

Author:

{'name': 'ADAM David Alan Martin', 'email': 'adam.martin@10gen.com', 'username': 'adamlsd'}

Message: SERVER-35784 Fix ambiguously named test fixture.

The `TypedCommand` defined in the anonymous namespace in
`commands_test.cpp` conflicts, ambiguously, with `mongo::TypedCommand`
from `commands.h`. This causes problems on Microsoft's compiler,
at this time.

(cherry picked from commit 7d7a17213df34b98c79bc016f5e945f6df805f2a)
Branch: v4.0
https://github.com/mongodb/mongo/commit/86f32255d90a07d8f50a1ed374528e9cba8dce3f

Comment by Githook User [ 26/Jun/18 ]

Author:

{'username': 'adamlsd', 'name': 'ADAM David Alan Martin', 'email': 'adam.martin@10gen.com'}

Message: SERVER-35784 Fix ambiguously named test fixture.

The `TypedCommand` defined in the anonymous namespace in
`commands_test.cpp` conflicts, ambiguously, with `mongo::TypedCommand`
from `commands.h`. This causes problems on Microsoft's compiler,
at this time.
Branch: master
https://github.com/mongodb/mongo/commit/7d7a17213df34b98c79bc016f5e945f6df805f2a

Generated at Thu Feb 08 04:40:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.