Produced by Araxis Merge on Thu Nov 17 16:01:41 2011 UTC. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | D:\P\boost_1_47_0\boost\iostreams\detail | is_dereferenceable.hpp | Fri Nov 11 11:53:46 2011 UTC |
2 | D:\P\boost_1_47_0_native\boost\iostreams\detail | is_dereferenceable.hpp | Fri Jan 8 06:41:00 2010 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 3 | 166 |
Changed | 1 | 4 |
Inserted | 0 | 0 |
Removed | 1 | 1 |
Whitespace | All differences in whitespace within lines are ignored |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | // (C) Cop yright 200 8 CodeRage , LLC (tur kanis at c oderage do t com) | 1 | // (C) Cop yright 200 8 CodeRage , LLC (tur kanis at c oderage do t com) | |||
2 | // (C) Cop yright 200 5-2007 Jon athan Turk anis | 2 | // (C) Cop yright 200 5-2007 Jon athan Turk anis | |||
3 | // (C) Cop yright Dav id Abraham s 2004. | 3 | // (C) Cop yright Dav id Abraham s 2004. | |||
4 | // Distrib uted under the Boost Software License, V ersion 1.0 . (See acc ompanying | 4 | // Distrib uted under the Boost Software License, V ersion 1.0 . (See acc ompanying | |||
5 | // file LI CENSE_1_0. txt or cop y at http: //www.boos t.org/LICE NSE_1_0.tx t.) | 5 | // file LI CENSE_1_0. txt or cop y at http: //www.boos t.org/LICE NSE_1_0.tx t.) | |||
6 | 6 | |||||
7 | // See htt p://www.bo ost.org/li bs/iostrea ms for doc umentation . | 7 | // See htt p://www.bo ost.org/li bs/iostrea ms for doc umentation . | |||
8 | 8 | |||||
9 | #ifndef BO OST_IOSTRE AMS_DETAIL _IS_DEREFE RENCEABLE_ HPP_INCLUD ED | 9 | #ifndef BO OST_IOSTRE AMS_DETAIL _IS_DEREFE RENCEABLE_ HPP_INCLUD ED | |||
10 | #define BO OST_IOSTRE AMS_DETAIL _IS_DEREFE RENCEABLE_ HPP_INCLUD ED | 10 | #define BO OST_IOSTRE AMS_DETAIL _IS_DEREFE RENCEABLE_ HPP_INCLUD ED | |||
11 | 11 | |||||
12 | # include <boost/typ e_traits/d etail/bool _trait_def .hpp> | 12 | # include <boost/typ e_traits/d etail/bool _trait_def .hpp> | |||
13 | # include <boost/typ e_traits/d etail/temp late_arity _spec.hpp> | 13 | # include <boost/typ e_traits/d etail/temp late_arity _spec.hpp> | |||
14 | # include <boost/typ e_traits/r emove_cv.h pp> | 14 | # include <boost/typ e_traits/r emove_cv.h pp> | |||
15 | # include <boost/mpl /aux_/lamb da_support .hpp> | 15 | # include <boost/mpl /aux_/lamb da_support .hpp> | |||
16 | # include <boost/mpl /bool.hpp> | 16 | # include <boost/mpl /bool.hpp> | |||
17 | # include <boost/det ail/workar ound.hpp> | 17 | # include <boost/det ail/workar ound.hpp> | |||
18 | 18 | |||||
19 | namespace boost { na mespace io streams { namespace detail { | 19 | namespace boost { na mespace io streams { namespace detail { | |||
20 | 20 | |||||
21 | // is_dere ferenceabl e<T> metaf unction | 21 | // is_dere ferenceabl e<T> metaf unction | |||
22 | // | 22 | // | |||
23 | // Require s: Given x of type T &, if the expression *x is wel l-formed | 23 | // Require s: Given x of type T &, if the expression *x is wel l-formed | |||
24 | // it must have comp lete type; otherwise , it must neither be ambiguous | 24 | // it must have comp lete type; otherwise , it must neither be ambiguous | |||
25 | // nor vio late acces s. | 25 | // nor vio late acces s. | |||
26 | 26 | |||||
27 | // This na mespace en sures that ADL doesn 't mess th ings up. | 27 | // This na mespace en sures that ADL doesn 't mess th ings up. | |||
28 | namespace is_derefer enceable_ | 28 | namespace is_derefer enceable_ | |||
29 | { | 29 | { | |||
30 | // a typ e returned from oper ator* when no increm ent is fou nd in the | 30 | // a typ e returned from oper ator* when no increm ent is fou nd in the | |||
31 | // type' s own name space | 31 | // type' s own name space | |||
32 | struct t ag {}; | 32 | struct t ag {}; | |||
33 | 33 | |||||
34 | // any s oaks up im plicit con versions a nd makes t he followi ng | 34 | // any s oaks up im plicit con versions a nd makes t he followi ng | |||
35 | // opera tor* less- preferred than any o ther such operator t hat | 35 | // opera tor* less- preferred than any o ther such operator t hat | |||
36 | // might be found via ADL. | 36 | // might be found via ADL. | |||
37 | struct a ny { templ ate <class T> any(T const&); } ; | 37 | struct a ny { templ ate <class T> any(T const&); } ; | |||
38 | 38 | |||||
39 | // This is a last- resort ope rator* for when none other is found | 39 | // This is a last- resort ope rator* for when none other is found | |||
40 | tag oper ator*(any const&); | 40 | tag oper ator*(any const&); | |||
41 | 41 | |||||
42 | # if BOOST _WORKAROUN D(__MWERKS __, BOOST_ TESTED_AT( 0x3202)) \ | 42 | # if BOOST _WORKAROUN D(__MWERKS __, BOOST_ TESTED_AT( 0x3202)) \ | |||
43 | || BOO ST_WORKARO UND(BOOST_ MSVC, <= 1 300) | 43 | || BOO ST_WORKARO UND(BOOST_ MSVC, <= 1 300) | |||
44 | # define BOOST_comm a(a,b) (a) | 44 | # define BOOST_comm a(a,b) (a) | |||
45 | # else | 45 | # else | |||
46 | // In ca se an oper ator++ is found that returns v oid, we'll use ++x,0 | 46 | // In ca se an oper ator++ is found that returns v oid, we'll use ++x,0 | |||
47 | tag oper ator,(tag, int); | 47 | tag oper ator,(tag, int); | |||
48 | # define BOOST_comm a(a,b) (a, b) | 48 | # define BOOST_comm a(a,b) (a, b) | |||
49 | # endif | 49 | # endif | |||
50 | 50 | |||||
51 | // two c heck overl oads help us identif y which op erator++ w as picked | 51 | // two c heck overl oads help us identif y which op erator++ w as picked | |||
52 | char (& check BOOS T_PREVENT_ MACRO_SUBS TITUTION(t ag) )[2]; | 52 | char (& check BOOS T_PREVENT_ MACRO_SUBS TITUTION(t ag) )[2]; | |||
53 | 53 | |||||
54 | template <class T> | 54 | template <class T> | |||
55 | ch ar check B OOST_PREVE NT_MACRO_S UBSTITUTIO N(T const& ); | 55 | char che ck BOOST_P REVENT_MAC RO_SUBSTIT UTION(T co nst&); | |||
56 | 56 | |||||
57 | ||||||
58 | template <class T> | 57 | template <class T> | |||
59 | struct i mpl | 58 | struct i mpl | |||
60 | { | 59 | { | |||
61 | stat ic typenam e boost::r emove_cv<T >::type& x ; | 60 | stat ic typenam e boost::r emove_cv<T >::type& x ; | |||
62 | 61 | |||||
63 | BOOS T_STATIC_C ONSTANT( | 62 | BOOS T_STATIC_C ONSTANT( | |||
64 | bool | 63 | bool | |||
65 | , value | 64 |
,
value
=
sizeof(is_
dereferenc
eable_::ch
eck
BOOST_PREV
ENT_MACRO_
SUBSTITUTI
ON(
|
|||
66 | ) = sizeof(is_ dereferenc eable_::ch eck BOOST_PREV ENT_MACRO_ SUBSTITUTI ON( ( BOOST_comm a(*x,0))) ) == 1 ; | 65 | ); | |||
67 | }; | 66 | }; | |||
68 | } | 67 | } | |||
69 | 68 | |||||
70 | # undef BO OST_comma | 69 | # undef BO OST_comma | |||
71 | 70 | |||||
72 | template<t ypename T> | 71 | template<t ypename T> | |||
73 | struct is_ dereferenc eable | 72 | struct is_ dereferenc eable | |||
74 | BOOST_ TT_AUX_BOO L_C_BASE(i s_derefere nceable_:: impl<T>::v alue) | 73 | BOOST_ TT_AUX_BOO L_C_BASE(i s_derefere nceable_:: impl<T>::v alue) | |||
75 | { | 74 | { | |||
76 | BOOST_ TT_AUX_BOO L_TRAIT_VA LUE_DECL(i s_derefere nceable_:: impl<T>::v alue) | 75 | BOOST_ TT_AUX_BOO L_TRAIT_VA LUE_DECL(i s_derefere nceable_:: impl<T>::v alue) | |||
77 | BOOST_ MPL_AUX_LA MBDA_SUPPO RT(1,is_de referencea ble,(T)) | 76 | BOOST_ MPL_AUX_LA MBDA_SUPPO RT(1,is_de referencea ble,(T)) | |||
78 | }; | 77 | }; | |||
79 | 78 | |||||
80 | } } | 79 | } } | |||
81 | 80 | |||||
82 | BOOST_TT_A UX_TEMPLAT E_ARITY_SP EC(1, ::bo ost::iostr eams::deta il::is_der eferenceab le) | 81 | BOOST_TT_A UX_TEMPLAT E_ARITY_SP EC(1, ::bo ost::iostr eams::deta il::is_der eferenceab le) | |||
83 | 82 | |||||
84 | } // End n amespaces detail, io streams, b oost. | 83 | } // End n amespaces detail, io streams, b oost. | |||
85 | 84 | |||||
86 | #endif // BOOST_IOST REAMS_DETA IL_IS_DERE FERENCEABL E_HPP_INCL UDED | 85 | #endif // BOOST_IOST REAMS_DETA IL_IS_DERE FERENCEABL E_HPP_INCL UDED |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2007 Araxis Ltd (www.araxis.com). All rights reserved.