summarylogtreecommitdiffstats
path: root/countof.patch
blob: 17635681af13c8904a65707263f2825ee091d3c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/samples/hellovr_opengl/hellovr_opengl_main.cpp b/samples/hellovr_opengl/hellovr_opengl_main.cpp
index 64d1d47..dac2e9f 100644
--- a/samples/hellovr_opengl/hellovr_opengl_main.cpp
+++ b/samples/hellovr_opengl/hellovr_opengl_main.cpp
@@ -1276,6 +1276,12 @@ bool CMainApplication::SetupStereoRenderTargets()
 	return true;
 }
 
+//http://www.g-truc.net/post-0708.html
+template <typename T, std::size_t N>
+constexpr std::size_t _countof(T const (&)[N]) noexcept
+{
+return N;
+}
 
 //-----------------------------------------------------------------------------
 // Purpose: