[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] GVars3: Compiling with TooN 2 on Windows (VC++9.0/2008)
From: |
Markus Mayer |
Subject: |
[libcvd-members] GVars3: Compiling with TooN 2 on Windows (VC++9.0/2008) |
Date: |
Sat, 30 Jan 2010 23:01:30 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1 |
Hi,
while trying to compile libcvd/GVars3 on Windows (x64, Visual Studio
2008) I encountered a nasty problem in operators.hh, lines 60 to 63. The
compilation died with the following error:
1>C:\dev\Libraries\TooN\TooN/internal/operators.hh(60) : warning C4346:
'boost::type_of::msvc_typeid_wrapper<sizeof(disable_if<is_function<T>::type,sizer<T>::type>::type)>::type'
: dependent name is not a type
1> prefix with 'typename' to indicate a type
1> C:\dev\Libraries\TooN\TooN/internal/operators.hh(60) : see
reference to class template instantiation
'TooN::Internal::AddType<L,R,F>' being compiled
1>C:\dev\Libraries\TooN\TooN/internal/operators.hh(60) : error C2146:
syntax error : missing ';' before identifier 'type'
1>C:\dev\Libraries\TooN\TooN/internal/operators.hh(60) : error C4430:
missing type specifier - int assumed. Note: C++ does not support default-int
The line being:
template<class L, class R, int F = Field<L,R>::is> struct AddType {
typedef TOON_TYPEOF(gettype<L>()+gettype<R>()) type;};
Turns out error C4346 is a feature "in order to conform to the ISO C++
standard."
The solution is to add the "typename" keyword so that the line reads
template<class L, class R, int F = Field<L,R>::is> struct AddType {
typedef typename TOON_TYPEOF(gettype<L>()+gettype<R>()) type;};
After that change GVars3 compiles successfully.
Best regards from Berlin,
Markus
signature.asc
Description: OpenPGP digital signature
- [libcvd-members] GVars3: Compiling with TooN 2 on Windows (VC++9.0/2008),
Markus Mayer <=