This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 148
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
martinus
suggested changes
Mar 17, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Some minor suggestions from me
src/include/robin_hood.h
Outdated
@@ -188,6 +188,11 @@ static Counts& counts() { | |||
# else | |||
# define ROBIN_HOOD_PRIVATE_DEFINITION_HAS_NATIVE_WCHART() 0 | |||
# endif | |||
# if _MSC_VER <= 1900 | |||
# define ROBIN_HOOD_BROKEN_CONSTEXPR 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer a separate section for this, and to use the PRIVATE_DEFINITION thingy, something like this:
#if defined(_MSC_VER) && (_MSC_VER <= 1900)
# define ROBIN_HOOD_PRIVATE_DEFINITION_BROKEN_CONSTEXPR() 1
#else
# define ROBIN_HOOD_PRIVATE_DEFINITION_BROKEN_CONSTEXPR() 0
#endif
Then the define is always available and can be used like this:
#if !ROBIN_HOOD(BROKEN_CONSTEXPR)
constexpr
#endif
@@ -2233,8 +2233,8 @@ struct IterationLogic::Impl { | |||
hash = hash_combine(std::hash<std::string>{}(mBench.title()), hash); | |||
hash = hash_combine(std::hash<std::string>{}(mBench.timeUnitName()), hash); | |||
hash = hash_combine(std::hash<double>{}(mBench.timeUnit().count()), hash); | |||
hash = hash_combine(mBench.relative(), hash); | |||
hash = hash_combine(mBench.performanceCounters(), hash); | |||
hash = hash_combine(std::hash<bool>{}(mBench.relative()), hash); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: this will have to be fixed in upstream nanobench at https://github.com/martinus/nanobench
The pair(piecewise_construct_t, ...) constructor causes the error "C2476: ‘constexpr’ constructor does not initialize all members" The best information about this error is: https://devblogs.microsoft.com/cppblog/c11-constant-expressions-in-visual-studio-2015-rc/ but the error happens even with 2015 Update 3. The test cases that use piecewise_construct_t, try_emplace() or compact() cause internal compiler errors.
jeremyg-lunarg
force-pushed
the
jeremyg-msvc-2015
branch
from
March 17, 2021 15:55
82da208
to
7d620d7
Compare
martinus
approved these changes
Mar 17, 2021
sthagen
added a commit
to sthagen/martinus-robin-hood-hashing
that referenced
this pull request
Mar 17, 2021
Fix compiling with MSVC 2015 (martinus#118)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The pair(piecewise_construct_t, ...) constructor causes the error
"C2476: ‘constexpr’ constructor does not initialize all members"
The best information about this error is:
https://devblogs.microsoft.com/cppblog/c11-constant-expressions-in-visual-studio-2015-rc/
but the error happens even with 2015 Update 3.
The test cases that use piecewise_construct_t, try_emplace() or compact() cause internal
compiler errors.