XRTraits C++ OpenXR Utilities
twocall-just-function.cpp

This example shows how to use doTwoCall() when a function requires no additional arguments.

// Copyright 2019, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
#include <iostream>
int main()
{
auto apiLayers =
doTwoCall<XrApiLayerProperties>(xrEnumerateApiLayerProperties);
std::cout << "Enumerated layers:\n";
for (const auto& prop : apiLayers) {
std::cout << prop.layerName << " - " << prop.description
<< std::endl;
}
return 0;
}