mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
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:
parent
2891cb52d6
commit
54c78121c2
@ -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; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user