diff options
| author | gnaggnoyil <gnaggnoyil@gmail.com> | 2019-07-10 04:02:48 +0800 |
|---|---|---|
| committer | Curtis J Bezault <curtbezault@gmail.com> | 2019-07-09 16:02:48 -0400 |
| commit | 7f80c0e2d311c7ff2453bdd558e4e7fd91cea872 (patch) | |
| tree | 2ab8cd4514926f64e4e210696c151bc31d90ab45 /toolsrc/include | |
| parent | a15e2446faadd558171cd08f352bf51cb659d13a (diff) | |
| download | vcpkg-7f80c0e2d311c7ff2453bdd558e4e7fd91cea872.tar.gz vcpkg-7f80c0e2d311c7ff2453bdd558e4e7fd91cea872.zip | |
Make handle features (#6797)
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 213adb67c..e629ef0b2 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -6,9 +6,18 @@ #include <unordered_map> #include <utility> #include <vector> +#include <type_traits> namespace vcpkg::Util { + template <class T> + constexpr std::add_const_t<T>& as_const(T& t) noexcept + { + return t; + } + template <class T> + void as_const(const T&&) = delete; + template<class Container> using ElementT = std::remove_reference_t<decltype(*std::declval<typename std::remove_reference_t<Container>::iterator>())>; |
