[MOAB-dev] r1530 - MOAB/trunk/cmake

pebay at mcs.anl.gov pebay at mcs.anl.gov
Wed Jan 16 19:41:29 CST 2008


Author: pebay
Date: 2008-01-16 19:41:29 -0600 (Wed, 16 Jan 2008)
New Revision: 1530

Added:
   MOAB/trunk/cmake/TemplateSpecialization.cxx
Log:
ENH: verify whether template specialization is supported on the platform.


Added: MOAB/trunk/cmake/TemplateSpecialization.cxx
===================================================================
--- MOAB/trunk/cmake/TemplateSpecialization.cxx	                        (rev 0)
+++ MOAB/trunk/cmake/TemplateSpecialization.cxx	2008-01-17 01:41:29 UTC (rev 1530)
@@ -0,0 +1,11 @@
+template <unsigned S> class MyTempl { public: char data[S]; }; 
+template <> class MyTempl<0> { public: char value; }; 
+
+int main()
+{
+  MyTempl<1> one; 
+  MyTempl<0> zero; 
+  one.data[0] = zero.value = '\0'; 
+
+  return 0;
+}




More information about the moab-dev mailing list