Sha256: 966433a422f575ff58f50e5bf75119f390a0cb2a433b2d4718bf19448aadb6cc
Contents?: true
Size: 1.2 KB
Versions: 2
Compression:
Stored size: 1.2 KB
Contents
/* * Created by Phil on 15/04/2013. * Copyright 2013 Two Blue Cubes Ltd. All rights reserved. * * Distributed under the Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ #ifndef TWOBLUECUBES_CATCH_SFINAE_HPP_INCLUDED #define TWOBLUECUBES_CATCH_SFINAE_HPP_INCLUDED // Try to detect if the current compiler supports SFINAE #include "catch_compiler_capabilities.h" namespace Catch { struct TrueType { static const bool value = true; typedef void Enable; char sizer[1]; }; struct FalseType { static const bool value = false; typedef void Disable; char sizer[2]; }; #ifdef CATCH_CONFIG_SFINAE template<bool> struct NotABooleanExpression; template<bool c> struct If : NotABooleanExpression<c> {}; template<> struct If<true> : TrueType {}; template<> struct If<false> : FalseType {}; template<int size> struct SizedIf; template<> struct SizedIf<sizeof(TrueType)> : TrueType {}; template<> struct SizedIf<sizeof(FalseType)> : FalseType {}; #endif // CATCH_CONFIG_SFINAE } // end namespace Catch #endif // TWOBLUECUBES_CATCH_SFINAE_HPP_INCLUDED
Version data entries
2 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
redsnow-0.3.2 | ext/snowcrash/ext/markdown-parser/test/ext/Catch/include/internal/catch_sfinae.hpp |
redsnow-0.3.2 | ext/snowcrash/test/vendor/Catch/include/internal/catch_sfinae.hpp |