[SERVER-11841] Win32 AtomicIntrinsics relies on MSVC extension for member template specializations Created: 23/Nov/13  Updated: 11/Jul/16  Resolved: 07/Jan/14

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

Type: Bug Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: mingw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: Windows
Participants:

 Description   

The specialization of InterlockedImpl in the class is illegal in atomic_intrisics_win32.h:

An explicit specialization shall be declared in the namespace of which the template is a member, or, for member templates, in the namespace of which the enclosing class or enclosing class template is a member.

An explicit specialization of a member function, member class or static data member of a class template shall be declared in the namespace of which the class template is a member.

The definition should be moved up to namespace scope, which probably implies some code motion.



 Comments   
Comment by Githook User [ 07/Jan/14 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-11841 Move Win32 LoadStore and Interlocked specializations to namespace scope
Branch: master
https://github.com/mongodb/mongo/commit/fe567abc1d6bf07972c0f2704079298b67c6a1f6

Comment by Eliot Horowitz (Inactive) [ 27/Nov/13 ]

/usr/bin/x86_64-w64-mingw32-g++ -I src/ -I src/third_party/boost/ -I build/linux2/normal/ src/mongo/platform/atomic_word_test.cpp

Comment by Andrew Morrow (Inactive) [ 27/Nov/13 ]

I will attempt to get done for 2.6, I think it is straightforward code motion. Eliot, can you include the steps you used to do a build targeting mingw? I'll need that to repro and verify a fix.

Comment by Eliot Horowitz (Inactive) [ 25/Nov/13 ]

Right now gcc can't compile mongo on windows.

Comment by Andy Schwerin [ 25/Nov/13 ]

I could use some context to understand why we want to make this change – is it to improve driver support on Windows, or in support of C++11 compatibility, e.g.? I ask because it might affect the "right" solution.

Comment by Eliot Horowitz (Inactive) [ 23/Nov/13 ]

Can we take a quick look at this?
If its more than an hour or two of work, punt to 2.7, but if not, would be very helpful to have now and for 2.6 maintenance forever.

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