Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
407e65a0
Commit
407e65a0
authored
4 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Remove hack in LLInstanceTracker that doesn't apply to msvc in c++17 mode
parent
9fe094dc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llcommon/llinstancetracker.h
+0
-32
0 additions, 32 deletions
indra/llcommon/llinstancetracker.h
with
0 additions
and
32 deletions
indra/llcommon/llinstancetracker.h
+
0
−
32
View file @
407e65a0
...
...
@@ -144,23 +144,7 @@ class LLInstanceTracker
}
// lock static data during construction
#if ! LL_WINDOWS
LockStatic
mLock
;
#else // LL_WINDOWS
// We want to be able to use (e.g.) our instance_snapshot subclass as:
// for (auto& inst : T::instance_snapshot()) ...
// But when this snapshot base class directly contains LockStatic, as
// above, Visual Studio 2017 requires us to code instead:
// for (auto& inst : std::move(T::instance_snapshot())) ...
// nat thinks this should be unnecessary, as an anonymous class
// instance is already a temporary. It shouldn't need to be cast to
// rvalue reference (the role of std::move()). clang evidently agrees,
// as the short form works fine with Xcode on Mac.
// To support the succinct usage, instead of directly storing
// LockStatic, store std::shared_ptr<LockStatic>, which is copyable.
std
::
shared_ptr
<
LockStatic
>
mLockp
{
std
::
make_shared
<
LockStatic
>
()};
LockStatic
&
mLock
{
*
mLockp
};
#endif // LL_WINDOWS
VectorType
mData
;
};
...
...
@@ -391,23 +375,7 @@ class LLInstanceTracker<T, void, KEY_COLLISION_BEHAVIOR>
}
// lock static data during construction
#if ! LL_WINDOWS
LockStatic
mLock
;
#else // LL_WINDOWS
// We want to be able to use our instance_snapshot subclass as:
// for (auto& inst : T::instance_snapshot()) ...
// But when this snapshot base class directly contains LockStatic, as
// above, Visual Studio 2017 requires us to code instead:
// for (auto& inst : std::move(T::instance_snapshot())) ...
// nat thinks this should be unnecessary, as an anonymous class
// instance is already a temporary. It shouldn't need to be cast to
// rvalue reference (the role of std::move()). clang evidently agrees,
// as the short form works fine with Xcode on Mac.
// To support the succinct usage, instead of directly storing
// LockStatic, store std::shared_ptr<LockStatic>, which is copyable.
std
::
shared_ptr
<
LockStatic
>
mLockp
{
std
::
make_shared
<
LockStatic
>
()};
LockStatic
&
mLock
{
*
mLockp
};
#endif // LL_WINDOWS
VectorType
mData
;
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment