From VC++ to GNU++

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Sep 2008
Posts: 31
Reputation: rmlopes is an unknown quantity at this point 
Solved Threads: 0
rmlopes rmlopes is offline Offline
Light Poster

From VC++ to GNU++

 
0
  #1
Apr 9th, 2009
Hello,

I developed an application in VC++ an now I want to compile it using GNU++ to be run on a ubuntu server (where I am actually trying tocompile it). After some syntax/usage corrections I get an error which I totally don't understand (and I don't have it in VC++, of course).
The error is
  1. Utils.h: In static member function âstatic void brickheuristics::TL2FunV<TList, SearchFun>::FillVector(std::vector<SearchFun, std::allocator<_Tp> >&)â:
  2. Utils.h:43: error: expected `;' before âhâ
  3.  

Now, the function it refers to is the following (error at the 4th line)

  1. template< class TList, class SearchFun >
  2. struct TL2FunV{
  3. static void FillVector( std::vector< SearchFun >& v ){
  4. TList::Head h;
  5. v.push_back( SearchFun(h) );
  6. TL2FunV<typename TList::Tail, SearchFun>::FillVector( v );
  7. }
  8. };

This application uses the Loki library, which is provided in /usr/lib and the includes in /usr/include.
Head is a typedef in Loki::TypeList, which is the type that is being provided to the function.
Does anyone know what the problem is/may be? Can someone identify a known difference between compilers? I would appreciate if someone could head me in the right direction to solve this.

Thank you in advance
Rui
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 31
Reputation: rmlopes is an unknown quantity at this point 
Solved Threads: 0
rmlopes rmlopes is offline Offline
Light Poster

Re: From VC++ to GNU++

 
0
  #2
Apr 9th, 2009
Because it is a template parameter derived type it needs the typename keyword before.. For some reason VC++ compiles anyway...
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC