OSDN Git Service

fixed.hpp
authormyun2 <myun2@nwhite.info>
Mon, 11 Jun 2012 04:11:51 +0000 (13:11 +0900)
committermyun2 <myun2@nwhite.info>
Mon, 11 Jun 2012 04:11:51 +0000 (13:11 +0900)
roast/include/roast/lexical2/fixed.hpp

index 02324cf..b707f74 100644 (file)
@@ -14,12 +14,10 @@ namespace roast
                {
                        ////////////////////////////////////////////////////////////////////
                        
-                       template <typename T, T _Val>
-                       class fixed : public lengthable
+                       template <typename T>
+                       class fixed : public length_<sizeof(T)>
                        {
                        public:
-                               static const int length = sizeof(T);
-
                                template <typename _It, typename _Param>
                                bool analyze(_It& it, _Param& param)
                                {
@@ -53,31 +51,6 @@ namespace roast
                                }*/
                        };
 
-                       /////////////////////////////////////////////////////////////
-
-                       template <unsigned char _ByteCode>
-                       class unibyte : public fixed_numeric<unsigned char, _ByteCode> {};
-
-                       template <char _Val>
-                       class fixed_char : public fixed_numeric<char, _Val> {};
-                       template <short _Val>
-                       class fixed_short : public fixed_numeric<short, _Val> {};
-                       template <int _Val>
-                       class fixed_int : public fixed_numeric<int, _Val> {};
-                       template <long _Val>
-                       class fixed_long : public fixed_numeric<long, _Val> {};
-
-                       template <unsigned char _Val>
-                       class fixed_uchar : public fixed_numeric<unsigned char, _Val> {};
-                       template <unsigned short _Val>
-                       class fixed_ushort : public fixed_numeric<unsigned short, _Val> {};
-                       template <unsigned int _Val>
-                       class fixed_uint : public fixed_numeric<unsigned int, _Val> {};
-                       template <unsigned long _Val>
-                       class fixed_ulong : public fixed_numeric<unsigned long, _Val> {};
-
-                       typedef unibyte<0> zeroterm;
-                       
                        ////////////////////////////////////////////////////////////////////
                }
        }