Opened 11 years ago

Closed 11 years ago

#5885 closed Bugs (fixed)

Document mistake: is_union

Reported by: Yuhki Ogasawara <y121516@…> Owned by: John Maddock
Milestone: To Be Determined Component: type_traits
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:

Description

http://www.boost.org/doc/libs/1_47_0/libs/type_traits/doc/html/boost_typetraits/reference/is_union.html The part of examples are wrong.

    is_union<void> inherits from true_type. 
    is_union<const void>::type is the type true_type. 
    is_union<void>::value is an integral constant expression that evaluates to true.

I think the all of examples should be

Examples:
    Given: union my_union { };
    is_union<my_union> inherits from true_type. 
    is_union<const my_union>::type is the type true_type. 
    is_union<my_union>::value is an integral constant expression that evaluates to true. 
    is_union<my_union*>::value is an integral constant expression that evaluates to false. 
    is_union<T>::value_type is the type bool. 

Change History (1)

comment:1 by John Maddock, 11 years ago

Resolution: fixed
Status: newclosed

(In [74336]) Fix errors in is_union examples. Fixes #5885.

Note: See TracTickets for help on using tickets.