Boost logo

Boost Users :

Subject: Re: [Boost-users] multi_index::composite_key with char[]
From: Joaquin M LópezMuñoz (joaquin_at_[hidden])
Date: 2015-09-07 14:54:02


leyiliu <595657419 <at> qq.com> writes:

>
> Hi,All:
> When I use the multi_index::composite_key with char[],I meet a
> error,when find a element。It seems to the make_tuple can't support the
> char[].Because the char[] more faster the std::string。So our project
> choose char[] as the column instead of std::string.So How should I do

Hi leyiliu,

I'm not totally sure I'm getting your question, so allow to me to
make a guess:

I assume you have something like

    struct X
    {
      int x;
      char str[20];
    };
    
    using multi_index_t=multi_index_container<
      X,
      indexed_by<
        ordered_unique<
          composite_key<
            X,
            member<X,int,&X::x>,
            member<X,char[20],&X::str>
>
        €€€€€€ø(€€€€øì((€€€€¸¸¸((€€€µÕ±Ñ¥}¥¹‘•á}Ё´ô¸¸¸ì(€€€…ÕѼ¥Ðõ´¹±½Ý•É}‰½Õ¹¡Íѐèéµ…­•}ÑÕÁ±” Ä°‰¡•±±¼ˆ¤¤ì()Ý¡¥ ™…¥±ÌÝ¥Ñ ()•ÉɽÈ聹¼µ…э ™½È…±°Ñ¼€œ¡½¹ÍЁÍѐè鱕ÍÌñ¡…ȁlÈÁtø¤(¡½¹ÍЁ¡…Ȩ½¹ÍИ°½¹ÍЁ¡…ȁlÈÁt¤()‰•…ÕÍ”Íѐè鱕ÍÌñ¡…ÉlÈÁtøÝ½¸Ð…•ÁЁ„½¹ÍЁ¡…Ȩ€¡Ñ¡”ÑåÁ”)½˜€‰¡•±±¼ˆ¤…́…¸…ɝյ•¹Ð¸Q¡•É”ÌÑݼ‘¥á•Ì™½ÈÑ¡¥Ìè((ĸAɽ٥‘”„½µÁ…ɥͽ¸™½ÈÍÑȁѡ…Ё‘½•ÌÑ¡”Ý½É¬((€€€ÕÍ¥¹œµÕ±Ñ¥}¥¹‘•á}ÐõµÕ±Ñ¥}¥¹‘•á}½¹Ñ…¥¹•Èð(€€€€€`°(€€€€€¥¹‘•á•‘}‰äð(€€€€€€€½É‘•É•‘}Õ¹¥ÅÕ”ð(€€€€€€€€€½µÁ½Í¥Ñ•}­•äð(€€€€€€€€€€€`°(€€€€€€€€€€€µ•µ‰•Èñ`±¥¹Ð°™`èéàø°(€€€€€€€€€€€µ•µ‰•Èñ`±¡…ÉlÈÁt°™`èéÍÑÈø(€€€€€€€€€€ø°(€€€€€€€€€½µÁ½Í¥Ñ•}­•å}½µÁ…É”ð(€€€€€€€€€€€Íѐè鱕ÍÌñ¥¹Ðø°(€€€€€€€€€€€Íѐè鱕ÍÌñ½¹ÍЁ¡…Ȩø(€€€€€€€€€€ø(€€€€€€€€ø(€€€€€€ø(€€€€øì()Íѐè鱕ÍÌñ½¹6†"£âv÷&·2WVÆÇ’vVÆÂf÷"6öç7B6†"¢æ@¦6†%³#Ò‡FV6†æ–6ÆÇ’ÂF†RÆGFW"¦FV6—2¢Fò6öç7B6†"¢v†Vâ76V@§Fò7FC£¦ÆW73£¦÷W&F÷"‚’’à £"â&÷f–FR¶W’W‡G&7F÷"F†B&WGW&ç26öç7B6†"¢&F†W"F†â§&VfW&Væ6RFò6†%³#Ó  ¢–æÆ–æR6öç7B6†"¢vWE÷7G"†6öç7B‚b‚—·&WGW&â‚ç7G#·Ð¢


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net