-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add template deduction guide for Slice constructor
PR #1367 added an explicit Slice constructor which allows constructing from any C++ container. This adds a template deduction guide for that constructor which allows the Slice type to be inferred from the container's contained type. This applies to C++17 only. Note that, because C can be any type of container, we need to use a template template parameter. Test: cargo test Test: cargo test -F c++14 Test: cargo test -F c++17 Test: cargo test -F c++20
- Loading branch information
1 parent
94e8e46
commit f846bb6
Showing
2 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
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
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