Changes between Initial Version and Version 2 of Ticket #5658
- Timestamp:
- Jul 18, 2013, 8:27:50 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5658
- Property Owner changed from to
- Property Cc added; removed
- Property Component graph → property_tree
-
Ticket #5658 – Description
initial v2 1 1 compiling e.g libs/graph/src/graphml.cpp warns ... 2 ----- 2 3 {{{ 3 4 /boost/property_tree/detail/rapidxml.hpp: In function `size_t boost::property_t 4 5 ree::detail::rapidxml::internal::get_index(Ch) [with Ch = char]': … … 25 26 ./boost/property_tree/detail/rapidxml.hpp:317: warning: comparison is always fal 26 27 se due to limited range of data type 27 --------- 28 }}} 29 28 30 Caused by the template: 31 32 {{{ 29 33 template<class Ch> 30 34 inline size_t get_index(const Ch c) … … 37 41 return c; 38 42 } 39 ---------- 43 }}} 44 40 45 How to avoid ? 41 46 Just specify additionally a user defined implementation 42 47 of get_index for the "char" type : 43 48 49 {{{ 44 50 inline size_t get_index(const char c) 45 51 { … … 57 63 return c; 58 64 } 59 --------- 65 }}} 66 60 67 I checked the code size (using gcc4.0) : same 61 68 and the difference of the ASM code: "same" 62 69 63 70 {{{ 64 71 14972c14972 65 72 < cmpq (%r15), %rdi … … 88 95 15487c15487 89 96 --- 97 }}}