Lines Matching refs:has_negate
8 [section:has_negate has_negate]
10 struct has_negate : public __tof {};
24 f(-rhs); // is valid if has_negate<Rhs, Ret>::value==true
28 __header `#include <boost/type_traits/has_negate.hpp>` or `#include <boost/type_traits/has_operator…
34 [:`has_negate<Rhs, Ret>::value_type` is the type `bool`.]
35 [:`has_negate<Rhs, Ret>::value` is a `bool` integral constant expression.]
36 [:`has_negate<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
37 [:`has_negate<long>` inherits from `__true_type`.]
39 [:`has_negate<int, int>` inherits from `__true_type`.]
40 [:`has_negate<int, long>` inherits from `__true_type`.]
41 [:`has_negate<double, double>` inherits from `__true_type`.]
42 [:`has_negate<double, int>` inherits from `__true_type`.]
43 [:`has_negate<const int>` inherits from `__true_type`.]
45 [:`has_negate<int, std::string>` inherits from `__false_type`.]
54 instantiating `has_negate<Rhs>` will produce a compiler error.
55 For this reason `has_negate` cannot be used to determine whether a type has a public `operator-` or…
58 boost::has_negate<A>::value; // error: A::operator-() is private
67 boost::has_negate<A>::value; // this is fine
68 boost::has_negate<B>::value; // error: ambiguous overload
76 #include <boost/type_traits/has_negate.hpp>
94 std::cout<<boost::has_negate< contains< good > >::value<<'\n'; // true
98 std::cout<<boost::has_negate< contains< bad > >::value<<'\n'; // true, should be false