• <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++博客 首頁 新隨筆 聯系 聚合 管理
              217 Posts :: 61 Stories :: 32 Comments :: 0 Trackbacks
            搞了搞split,發現boost里邊已經有了,就拿過來直接用,之前翻了下facebook的,也沒見比boost更容易讀,還是boost算了。
            在vs2012上編譯了一下,發現有問題: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 閱讀(1071) 評論(0)  編輯 收藏 引用 所屬分類: boost
            久久99热只有频精品8| 日本精品久久久久久久久免费| 久久久久国产亚洲AV麻豆| 97久久精品国产精品青草| 久久亚洲精品人成综合网| 偷窥少妇久久久久久久久| 色综合久久夜色精品国产| 国产精品久久久久久久app| 中文字幕无码久久精品青草| 久久国产欧美日韩精品| 人妻精品久久久久中文字幕69 | 中文国产成人精品久久亚洲精品AⅤ无码精品 | 99久久精品费精品国产 | 好久久免费视频高清| 久久精品www人人爽人人| 99久久久国产精品免费无卡顿| 日韩精品久久久久久| 久久婷婷人人澡人人| A级毛片无码久久精品免费| 99久久人妻无码精品系列蜜桃| 99久久伊人精品综合观看| 一级做a爰片久久毛片看看| 午夜精品久久久久久久| 久久这里只有精品首页| 无码任你躁久久久久久| 久久国产精品无码一区二区三区 | 国产精品成人99久久久久 | 日日噜噜夜夜狠狠久久丁香五月| avtt天堂网久久精品| 久久久91人妻无码精品蜜桃HD| 99精品国产综合久久久久五月天| 国产精品一区二区久久国产| 久久久久久国产a免费观看不卡| 国产精品一区二区久久精品涩爱| 99久久精品国产麻豆| 无码乱码观看精品久久| 国产91久久精品一区二区| 波多野结衣久久| 久久91精品综合国产首页| 久久精品国产精品亚洲毛片| 伊人色综合久久天天网|