個人檔案Quake3 启示录相片部落格清單更多 工具 說明

部落格


    4月21日

    is_integral 宏展开


    struct integral_c_tag
    {
        static const int value = 0;
    };

    template< bool C_ > struct bool_
    {
        static const bool value = C_;
        typedef integral_c_tag tag;
        typedef bool_ type;
        typedef bool value_type;
        operator bool() const
        {
            return this->value;
        }
    };
    typedef bool_<true> true_;
    typedef bool_<false> false_;
    template< typename T, T N > struct integral_c;

    template <class T, T val>
    struct integral_constant: public integral_c<T, val>
    {
        typedef integral_constant<T,val> type;
    };
    template<> struct integral_constant<bool,false>: false_
    {
       typedef integral_constant<bool,false> type;
    };
    template<> struct integral_constant<bool,true>: true_
    {
        typedef integral_constant<bool,true> type;
    };

    template< typename T > struct is_integral : integral_constant<bool,false>   
    {
    };
    template<> struct is_integral<unsigned char> : integral_constant<bool,true>
    {
        /*BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true) \
        BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,is_integral,(unsigned char))
        */
    };
    BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_integral,unsigned char const,true)
    BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_integral,unsigned char volatile,true)
    BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_integral,unsigned char const volatile,true)

    回應

    請稍候...
    很抱歉,您輸入的回應過長。請縮短您的回應。
    您尚未輸入內容,請再試一次。
    很抱歉,目前無法新增您的回應,請稍後再試。
    若要新增回應,您的父母必須先給您權限。要求權限
    您的家長已關閉回應功能。
    很抱歉,目前無法刪除您的回應,請稍後再試。
    您已超過每日回應上限次數,請於 24 小時後再試一次。
    由於系統顯示您可能傳送垃圾郵件給其他使用者,因此您帳號中的回應功能已遭停用。 如果您認為自己帳號遭錯誤停用,請連絡 Windows Live 支援
    請完成下列安全檢查,以完成回應。
    您輸入的安全檢查字元必須與圖片或音訊中的字元相符。

    若要新增回應,請以您的 Windows Live ID 登入 (若您使用 Hotmail、Messenger 或 Xbox LIVE,則您已擁有 Windows Live ID)。登入


    沒有 Windows Live ID?註冊

    引用通告

    此內容的引用通告是:
    http://topameng.spaces.live.com/blog/cns!F962D4854A8233D!539.trak
    引述這則內容的部落格