diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-01-30 16:14:48 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-01-30 21:52:44 -0800 |
| commit | 8de71af4bd94ae1e41bf39a455ed716ac8cdf9bc (patch) | |
| tree | f3c06d83c144eae12d775fef15eff0ece25bf189 /toolsrc/include | |
| parent | 836de4b0748617db6d06b0eef6fe9ccff9980b1f (diff) | |
| download | vcpkg-8de71af4bd94ae1e41bf39a455ed716ac8cdf9bc.tar.gz vcpkg-8de71af4bd94ae1e41bf39a455ed716ac8cdf9bc.zip | |
Introduce "optional" alias
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg_Dependencies.h | 5 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg_optional.h | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index 9180cb65e..2595d9fb8 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -3,6 +3,7 @@ #include "package_spec.h" #include "StatusParagraphs.h" #include "vcpkg_paths.h" +#include "vcpkg_optional.h" namespace vcpkg::Dependencies { @@ -22,8 +23,8 @@ namespace vcpkg::Dependencies struct install_plan_action { install_plan_type plan_type; - std::unique_ptr<BinaryParagraph> binary_pgh; - std::unique_ptr<SourceParagraph> source_pgh; + optional<BinaryParagraph> binary_pgh; + optional<SourceParagraph> source_pgh; }; struct package_spec_with_install_plan diff --git a/toolsrc/include/vcpkg_optional.h b/toolsrc/include/vcpkg_optional.h new file mode 100644 index 000000000..7b935bea9 --- /dev/null +++ b/toolsrc/include/vcpkg_optional.h @@ -0,0 +1,5 @@ +#pragma once +#include <memory> + +template<class T> +using optional = std::unique_ptr<T>; |
