Adobe Source Libraries
1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
check_null.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2013 Adobe
3
Distributed under the Boost Software License, Version 1.0.
4
(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
*/
6
/**************************************************************************************************/
7
8
#include <
adobe/config.hpp
>
9
#include <boost/test/unit_test.hpp>
10
11
namespace
adobe
{
16
17
template
<
typename
T>
18
void
check_null
(
const
T& x) {
19
T t = T();
20
if
(t)
21
BOOST_ERROR(
"operator bool"
);
22
BOOST_CHECK_MESSAGE(!t,
"operator!"
);
23
24
BOOST_CHECK_MESSAGE(x,
"operator!"
);
25
if
(!x)
26
BOOST_ERROR(
"operator bool"
);
27
}
28
29
}
// namespace adobe
config.hpp
adobe::check_null
void check_null(const T &x)
Definition
check_null.hpp:18
adobe
Definition
class_template.hpp:7
adobe
test
check_null.hpp
Generated by
1.14.0