Sierra Toolkit Version of the Day
StaticAssert.hpp
00001 /*------------------------------------------------------------------------*/
00002 /*                 Copyright 2010 Sandia Corporation.                     */
00003 /*  Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive   */
00004 /*  license for use of this work by or on behalf of the U.S. Government.  */
00005 /*  Export of this program may require a license from the                 */
00006 /*  United States Government.                                             */
00007 /*------------------------------------------------------------------------*/
00008 
00009 #ifndef stk_util_util_StaticAssert_hpp
00010 #define stk_util_util_StaticAssert_hpp
00011 
00012 namespace stk {
00013 
00014 //----------------------------------------------------------------------
00023 template<bool expression> struct StaticAssert {};
00024 
00025 template<> struct StaticAssert<true> {
00026   enum { OK = true };
00027   static bool ok() { return true ; }
00028 };
00029 
00030 //----------------------------------------------------------------------
00031 
00032 } //namespace stk
00033 
00034 #endif
00035 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends