stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r387797 - /incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp
Date Fri, 24 Mar 2006 19:40:13 GMT
Anton Pevtsov wrote:

> The updated test version which uses generic strings (/*.*Gs} format is
> attached.

Looks good.

Martin

Btw., ...

[...]
>      "line %d. std::basic_string<%s, %s<%2$s>, %s<%2$s>>(%{#*s})."
           \
>      "replace (%{?}%zu%{;}%{?}begin + %zu%{;}"                                \
>      "%{?}, %zu%{;}%{?}, begin + %zu%{;}"                                     \
> -    "%{?}, %{#*s}%{;}%{?}, %{#*S}%{;}"                                       \
> +    "%{?}, %{/*.*Gs}%{;}%{?}, string(%{/*.*Gs})%{;}"                         \
>      "%{?}, %zu%{;}%{?}, %zu%{;}"                                             \
>      "%{?}, %zu%{;}%{?}, %#c%{;}"                                             \
>      "%{?}, begin + %zu%{;}%{?}, begin + %zu%{;})"
> @@ -458,13 +449,14 @@
>      cs.str, r_char >= which, cs.pos1, r_iters_ptr <= which, first1_off,      \
>      r_char >= which, cs.num1, r_iters_ptr <= which, last1_off,               \
>      r_ptr == which || r_num_ptr == which || r_iters_ptr == which ||          \
> -    r_iters_num_ptr == which, int (cs.src_len), cs.src, r_str == which ||    \
> -    r_num_str == which || r_iters_str == which, int (sizeof (charT)),        \
> -    src_use_empty ? &s_empty : &s_src, r_char == which ||                  
 \
> -    r_iters_char == which, cs.cnt, r_num_str == which, cs.pos2,              \
> -    r_num_ptr == which || r_num_str == which || r_iters_num_ptr == which,    \
> -    cs.num2, r_char == which || r_iters_char == which, cs.ch,                \
> -    r_iters_range == which, first2_off, r_iters_range == which, last2_off
> +    r_iters_num_ptr == which, int (sizeof (charT)), int (cs.src_len), wsrc,  \
> +    r_str == which || r_num_str == which || r_iters_str == which,            \
> +    int (sizeof (charT)), int (s_src.size ()), s_src.c_str (),               \
> +    r_char == which || r_iters_char == which, cs.cnt, r_num_str == which,    \
> +    cs.pos2, r_num_ptr == which || r_num_str == which ||                     \
> +    r_iters_num_ptr == which, cs.num2, r_char == which ||                    \
> +    r_iters_char == which, cs.ch, r_iters_range == which, first2_off,        \
> +    r_iters_range == which, last2_off

...yikes! These conditionals aeem to getting out of control!
We should think about how to simplify this stuff, it's almost
impossible to read.


Mime
View raw message