• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Error

            C++博客 首頁 新隨筆 聯(lián)系 聚合 管理
              217 Posts :: 61 Stories :: 32 Comments :: 0 Trackbacks
            搞了搞split,發(fā)現(xiàn)boost里邊已經(jīng)有了,就拿過來直接用,之前翻了下facebook的,也沒見比boost更容易讀,還是boost算了。
            在vs2012上編譯了一下,發(fā)現(xiàn)有問題:error C4996: 'std::_Copy_impl': Function call with para

            找了下,老外是這么說的:http://stackoverflow.com/questions/14141476/warning-with-boostsplit-when-compiling

            You haven't done anything wrong. Visual Studio is being overly cautious. In debug mode, visual studio uses something called "Checked Iterators". Pointers are also iterators, but the checking mechanism doesn't work with them. So when a standard library algorithm is called with pointers, which is something that boost::split does, it issues this warning.

            You'll get the same warning with this obviously safe code:

            int main()
            {
                int x[10] = {};
                int y[10] = {};
                int *a = x, *b = y;
                std::copy(a, a+10, b);
            }

            Disable the warning. It's for beginners. It's on by default for the safety of beginners, because if it was off by default, they wouldn't know how to turn it on.





            #include <boost/algorithm/string/classification.hpp>
            #include <boost/algorithm/string.hpp>
            void LearnSplit()
            {
                std::string strTem("1,2,3,4");
                std::list<std::string> listStrTem;
                std::vector<std::string> vectorStrTem;
                boost::split(listStrTem, strTem, boost::is_any_of(","));
                boost::split(vectorStrTem, strTem, boost::is_any_of(","));
                for(auto item : listStrTem)
                {
                    std::cout << item.c_str() << std::endl;
                }
                std::string s = "Hello, the beautiful world!";
                std::vector<std::string> rs;
                boost::split( rs, s, boost::is_any_of( " ,!" ), boost::token_compress_on );
            }
            int _tmain(int argc, _TCHAR* argv[])
            {
                LearnSplit();
            return 0;
            }
            posted on 2013-04-11 00:29 Enic 閱讀(1067) 評論(0)  編輯 收藏 引用 所屬分類: boost
            久久久精品人妻一区二区三区蜜桃 | 99国产欧美精品久久久蜜芽| 亚洲精品白浆高清久久久久久| 99精品国产99久久久久久97 | 久久无码人妻一区二区三区| 国产激情久久久久影院老熟女| 精品久久久久中文字幕一区| 久久精品国产免费观看| 亚洲AV日韩AV永久无码久久| 久久久久亚洲Av无码专| 欧美激情精品久久久久久| 亚洲AV日韩AV永久无码久久 | 久久精品无码一区二区三区免费| 亚洲精品无码久久千人斩| 狠狠久久亚洲欧美专区| 人妻精品久久无码专区精东影业| 青青青伊人色综合久久| 97久久天天综合色天天综合色hd | 久久久噜噜噜www成人网| 久久99精品久久久久久野外| 久久香蕉超碰97国产精品| 精品视频久久久久| 国产精品久久自在自线观看| 97久久国产露脸精品国产| 国产精品99久久久久久猫咪| 性高湖久久久久久久久| 久久天天躁狠狠躁夜夜2020老熟妇 | 久久精品国产99久久香蕉| 国产高潮国产高潮久久久| 国产欧美一区二区久久| 久久精品国产亚洲αv忘忧草 | 色狠狠久久AV五月综合| 国产69精品久久久久APP下载| 亚洲精品乱码久久久久久蜜桃 | 久久久无码精品亚洲日韩按摩| 欧美激情精品久久久久久久| 色偷偷888欧美精品久久久| 狠狠色婷婷久久一区二区三区| 久久青青草原亚洲av无码app| 久久这里只有精品首页| 久久99这里只有精品国产|