Updated ScopeExit "world" tests making person a struct instead of a class.

Added a code comment to Utility/IdentityType tmp_assert test.

[SVN r77071]
This commit is contained in:
Lorenzo Caminiti 2012-02-18 19:29:35 +00:00
parent 2891cb52d6
commit 54c78121c2

View File

@ -19,7 +19,7 @@
template<typename T, bool b> template<typename T, bool b>
struct abstract { struct abstract {
static const bool value = b; static const bool value = b;
virtual void f(T const& x) = 0; virtual void f(T const& x) = 0; // Pure virtual function.
}; };
TMP_ASSERT( TMP_ASSERT(
@ -38,13 +38,15 @@ TMP_ASSERT(
/* use `BOOST_IDENTITY_TYPE` in macro definition instead of invocation */ \ /* use `BOOST_IDENTITY_TYPE` in macro definition instead of invocation */ \
BOOST_STATIC_ASSERT(BOOST_IDENTITY_TYPE(parenthesized_metafunction)::value) BOOST_STATIC_ASSERT(BOOST_IDENTITY_TYPE(parenthesized_metafunction)::value)
// Specify only extra parenthesis `((...))`.
TMP_ASSERT_PAREN(( boost::is_const<std::map<int, char> const> )); TMP_ASSERT_PAREN(( boost::is_const<std::map<int, char> const> ));
// Specify both the extra parenthesis `((...))` and `BOOST_IDENTITY_TYPE` macro.
TMP_ASSERT( BOOST_IDENTITY_TYPE((boost::is_const<std::map<int, char> const>)) ); TMP_ASSERT( BOOST_IDENTITY_TYPE((boost::is_const<std::map<int, char> const>)) );
//] //]
//[tmp_assert_alternative_always //[tmp_assert_alternative_always
TMP_ASSERT_PAREN(( boost::is_const<int const> )); // Always extra `()`. TMP_ASSERT_PAREN(( boost::is_const<int const> )); // Always extra `((...))`.
TMP_ASSERT( boost::is_const<int const> ); // No extra `()` and no macro. TMP_ASSERT( boost::is_const<int const> ); // No extra `((...))` and no macro.
//] //]
int main() { return 0; } int main() { return 0; }