Move and add some template metaprogramming classes

This commit is contained in:
Vinnie Falco committed 2013-09-19 14:42:54 -07:00
1 parent 2a164f0165
commit 72fc42b60c
13 files changed
+497 -167

No files matched your search

-15
View File
@@ -128,21 +128,6 @@
//------------------------------------------------------------------------------
#ifndef DOXYGEN
namespace beast
{
template <bool b> struct BeastStaticAssert;
template <> struct BeastStaticAssert <true> { static void dummy() {} };
}
#endif
/** A compile-time assertion macro.
If the expression parameter is false, the macro will cause a compile error. (The actual error
message that the compiler generates may be completely bizarre and seem to have no relation to
the place where you put the static_assert though!)
*/
#define static_bassert(expression) beast::BeastStaticAssert<expression>::dummy();
/** This macro can be added to class definitions to disable the use of new/delete to
allocate the object on the heap, forcing it to only be used as a stack or member variable.
*/