Skip to content

Conversation

@smessmer
Copy link
Contributor

@smessmer smessmer commented Aug 6, 2020

Stack from ghstack:

The old implementation allowed calling SmallVector constructor and operator= for any type without restrictions,
but then failed with a compiler error when the type wasn't a collection.

Instead, we should only use it if Container follows a container concept and just not match the constructor otherwise.

This fixes an issue @kimishpatel was running into.

Differential Revision: D22983020

The old implementation allowed calling SmallVector constructor and operator= for any type without restrictions,
but then failed with a compiler error when the type wasn't a collection.

Instead, we should only use it if Container follows a container concept and just not match the constructor otherwise.

This fixes an issue @kimishpatel was running into.

Differential Revision: [D22983020](https://our.internmc.facebook.com/intern/diff/D22983020/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Aug 6, 2020
The old implementation allowed calling SmallVector constructor and operator= for any type without restrictions,
but then failed with a compiler error when the type wasn't a collection.

Instead, we should only use it if Container follows a container concept and just not match the constructor otherwise.

This fixes an issue @kimishpatel was running into.

Differential Revision: [D22983020](https://our.internmc.facebook.com/intern/diff/D22983020/)

ghstack-source-id: 109370513
Pull Request resolved: #42694
@dr-ci
Copy link

dr-ci bot commented Aug 6, 2020

💊 CI failures summary and remediations

As of commit cc41a65 (more details on the Dr. CI page):


  • 2/2 failures introduced in this PR

🕵️ 2 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_build (1/2)

Step: "(Optional) Merge target branch" (full log | diagnosis details | 🔁 rerun)

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/nightly_android.py 
Auto-merging .circleci/cimodel/data/simple/nightly_android.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/mobile_definitions.py 
Auto-merging .circleci/cimodel/data/simple/mobile_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/bazel_definitions.py 
Auto-merging .circleci/cimodel/data/simple/bazel_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/android_definitions.py 
Auto-merging .circleci/cimodel/data/simple/android_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/pytorch_build_definitions.py 
Auto-merging .circleci/cimodel/data/pytorch_build_definitions.py 
Automatic merge failed; fix conflicts and then commit the result. 

See CircleCI build pytorch_xla_linux_bionic_py3_6_clang9_build (2/2)

Step: "(Optional) Merge target branch" (full log | diagnosis details | 🔁 rerun)

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/nightly_android.py 
Auto-merging .circleci/cimodel/data/simple/nightly_android.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/mobile_definitions.py 
Auto-merging .circleci/cimodel/data/simple/mobile_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/bazel_definitions.py 
Auto-merging .circleci/cimodel/data/simple/bazel_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/android_definitions.py 
Auto-merging .circleci/cimodel/data/simple/android_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/pytorch_build_definitions.py 
Auto-merging .circleci/cimodel/data/pytorch_build_definitions.py 
Automatic merge failed; fix conflicts and then commit the result. 

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 1 time.

}

template <typename Container>
// note: The enable_if restricts Container to types that have a .begin() and .end()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this locally. It works.

Copy link
Contributor

@kimishpatel kimishpatel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix Sebastian.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 95f4f67.

@facebook-github-bot facebook-github-bot deleted the gh/smessmer/248/head branch August 11, 2020 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants