diff --git a/doc/html/boost_typetraits/category/value_traits/operators.html b/doc/html/boost_typetraits/category/value_traits/operators.html
index 588467d..e52ab9b 100644
--- a/doc/html/boost_typetraits/category/value_traits/operators.html
+++ b/doc/html/boost_typetraits/category/value_traits/operators.html
@@ -1148,7 +1148,15 @@
All traits are implemented the same way using preprocessor macros to avoid
code duplication. The main files are in boost/type_traits/detail
:
has_binary_operator.hpp
, has_prefix_operator.hpp
- and has_postfix_operator.hpp
. The example of prefix
+ and has_postfix_operator.hpp
.
+
+ Given a sufficiently conforming C++11 compiler, these traits are implemented + in a rather compact and straightforward way that should always give accurate + answers. +
+
+ In C++03 there is a legacy implementation, by way of example the prefix
operator-
is presented below:
T
then the instantiation of the corresponding
- trait will produce a compiler error. For this reason these traits cannot
- be used to determine whether a type has a public operator or not.
+ Prior to C++11, these traits cannot detect whether the operators are
+ public or not: if an operator is defined as a private member of type
+ T
then the instantiation
+ of the corresponding trait will produce a compiler error. For this
+ reason these traits cannot be used to determine whether a type has
+ a public operator or not.
struct A { private: A operator-(); }; boost::has_unary_minus<A>::value; // error: A::operator-() is private
A
and B
- is convertible to A
.
- In this case, the compiler will report an ambiguous overload because
- both the existing operator and the one we provide (with argument of
- type any
) need type
- conversion, so that none is preferred.
+ Prior to C++11, there is an issue if the operator exists only for type
+ A
and B
is convertible to A
. In this case, the compiler will
+ report an ambiguous overload because both the existing operator and
+ the one we provide (with argument of type any
)
+ need type conversion, so that none is preferred.
struct A { }; void operator-(const A&); struct B { operator A(); }; @@ -1388,7 +1397,7 @@ class bad { }; class good { }; -bool f(const good&, const good&) { } +bool f(const good&, const good&) { return true; } int main() { std::cout<<std::boolalpha; diff --git a/doc/html/index/s11.html b/doc/html/index/s11.html index 55d5c81..98bc5ae 100644 --- a/doc/html/index/s11.html +++ b/doc/html/index/s11.html @@ -24,7 +24,7 @@
A B C D E F H I M N O P R T U V