nicole mazzuca 6a41626eaf
[vcpkg] Format the C++ in CI (#11655)
* [vcpkg] Format the C++ in the CI

* format the C++

* CR
2020-07-06 16:45:34 -07:00

27 lines
464 B
C++

#pragma once
namespace vcpkg
{
template<typename T>
class Lazy
{
public:
Lazy() : value(T()), initialized(false) { }
template<class F>
T const& get_lazy(const F& f) const
{
if (!initialized)
{
value = f();
initialized = true;
}
return value;
}
private:
mutable T value;
mutable bool initialized;
};
}