OSDN Git Service

fixed_stringも
authormyun2 <myun2@nwhite.info>
Tue, 12 Jun 2012 08:40:13 +0000 (17:40 +0900)
committermyun2 <myun2@nwhite.info>
Tue, 12 Jun 2012 08:40:13 +0000 (17:40 +0900)
roast/include/roast/lexical2/fixed.hpp
roast/test/lexical2_test/source/lexical2_test.cpp

index 4cdfc23..7cb608e 100644 (file)
@@ -61,7 +61,7 @@ namespace roast
                                const T* p = data;
                                for(unsigned int i=length; i!=0; i--, p++, it++)
                                {
-                                       if ( *it != data )
+                                       if ( *it != *p )
                                                return false;
                                }
                                return true;
index 12a4d6e..5399d69 100644 (file)
@@ -13,6 +13,7 @@ int main()
                lexical::println(fixed_string("aaca",3));
 
                printf("%d\n", lexical::parse(fixed_char<'U'>(), "Z") );
+               printf("%d\n", lexical::parse(fixed_string("aaca",3), "aacaZ") );
        }
        catch(const ::std::string &s)
        {