[SERVER-13158] Scope OID::ourMachine and OID::ourMachineAndPid to oid.cpp rather than class OID Created: 12/Mar/14  Updated: 21/Nov/15  Resolved: 21/Nov/15

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Andrew Morrow (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

Having these as class statics visible to header consumers has effects when DLL visibility is in play, in particular the "two variables on one line" thing seems to be baffling MSVC in some bizarre way:

C:\cygwin\home\andrew\Documents\10gen\dev\opt\include\mongo/bson/oid.h(118) : error C2487: 'ourMachineAndPid' : member of dll interface class may not
be declared with dll interface

These statics are private, so they should just be scoped to OID.cpp rather than to class OID.

We can either fix this in the server codebase and pick it up in the C++ driver repo, or, if not, the C++ driver codebase will make this change.



 Comments   
Comment by Andrew Morrow (Inactive) [ 21/Nov/15 ]

This was fixed when OID was re-written.

Generated at Thu Feb 08 03:30:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.