Changeset 102839 in webkit


Ignore:
Timestamp:
Dec 14, 2011 3:55:12 PM (12 years ago)
Author:
andersca@apple.com
Message:

Work around a bug in the MSVC2005 compiler
https://bugs.webkit.org/show_bug.cgi?id=74550

Reviewed by Sam Weinig.

Source/JavaScriptCore:

Add template parameters for the return types of the partial specializations of BoundFunctionImpl.

  • wtf/Functional.h:

(WTF::R):

Tools:

Re-enable tests.

  • TestWebKitAPI/Tests/WTF/Functional.cpp:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r102836 r102839  
     12011-12-14  Anders Carlsson  <andersca@apple.com>
     2
     3        Work around a bug in the MSVC2005 compiler
     4        https://bugs.webkit.org/show_bug.cgi?id=74550
     5
     6        Reviewed by Sam Weinig.
     7
     8        Add template parameters for the return types of the partial specializations of BoundFunctionImpl.
     9
     10        * wtf/Functional.h:
     11        (WTF::R):
     12
    1132011-12-13  Jon Lee  <jonlee@apple.com>
    214
  • trunk/Source/JavaScriptCore/wtf/Functional.h

    r102813 r102839  
    150150class BoundFunctionImpl;
    151151
    152 template<typename FunctionWrapper> class BoundFunctionImpl<FunctionWrapper, typename FunctionWrapper::ResultType ()> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
     152template<typename FunctionWrapper, typename R> class BoundFunctionImpl<FunctionWrapper, R ()> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
    153153public:
    154154    explicit BoundFunctionImpl(FunctionWrapper functionWrapper)
     
    157157    }
    158158
    159     virtual typename FunctionWrapper::ResultType operator()()
     159    virtual R operator()()
    160160    {
    161161        return m_functionWrapper();
     
    166166};
    167167
    168 template<typename FunctionWrapper, typename P0> class BoundFunctionImpl<FunctionWrapper, typename FunctionWrapper::ResultType (P0)> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
     168template<typename FunctionWrapper, typename R, typename P0> class BoundFunctionImpl<FunctionWrapper, R (P0)> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
    169169
    170170public:
     
    175175    }
    176176
    177     virtual typename FunctionWrapper::ResultType operator()()
     177    virtual R operator()()
    178178    {
    179179        return m_functionWrapper(m_p0);
     
    185185};
    186186
    187 template<typename FunctionWrapper, typename P0, typename P1> class BoundFunctionImpl<FunctionWrapper, typename FunctionWrapper::ResultType (P0, P1)> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
     187template<typename FunctionWrapper, typename R, typename P0, typename P1> class BoundFunctionImpl<FunctionWrapper, R (P0, P1)> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
    188188public:
    189189    BoundFunctionImpl(FunctionWrapper functionWrapper, const P0& p0, const P1& p1)
  • trunk/Tools/ChangeLog

    r102824 r102839  
     12011-12-14  Anders Carlsson  <andersca@apple.com>
     2
     3        Work around a bug in the MSVC2005 compiler
     4        https://bugs.webkit.org/show_bug.cgi?id=74550
     5
     6        Reviewed by Sam Weinig.
     7
     8        Re-enable tests.
     9
     10        * TestWebKitAPI/Tests/WTF/Functional.cpp:
     11
    1122011-12-14  Csaba Osztrogonác  <ossy@webkit.org>
    213
  • trunk/Tools/TestWebKitAPI/Tests/WTF/Functional.cpp

    r102821 r102839  
    2828
    2929namespace TestWebKitAPI {
    30 
    31 #if !COMPILER(MSVC)
    3230
    3331static int returnFortyTwo()
     
    108106}
    109107
    110 #endif // !COMPILER(MSVC)
    111 
    112108} // namespace TestWebKitAPI
Note: See TracChangeset for help on using the changeset viewer.