ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] Re: [math constants] VC++ experts needed :)
by Bronek Kozicki other posts by this author
Mar 11 2004 7:50PM messages near this date
[boost] Re: Re: [math constants] C++ Language gurus views needed andCodewarrior & Comeau testers | [boost] Re: [math constants] VC++ experts needed :)
Daniel Frey <daniel.frey@[...].de>  wrote:
>  template <typename U>
>  void f (const B<U>&)
>  {
>     U<double> v;
>     v.g();
>  }

There's an error:

C:\DATA\USERS\bronislaw\My Documents\msys\T248.cpp(15) : error C2143:
syntax error : missing ';' before '<'
        C:\DATA\USERS\bronislaw\My Documents\msys\T248.cpp(22) : see
reference to function template instantiation 'void f<V> (const B<T> &)'
being compiled
        with
        [
            T=V
        ]
C:\DATA\USERS\bronislaw\My Documents\msys\T248.cpp(15) : error C2143:
syntax error : missing ';' before '<'
C:\DATA\USERS\bronislaw\My Documents\msys\T248.cpp(16) : error C2065:
'v' : undeclared identifier
C:\DATA\USERS\bronislaw\My Documents\msys\T248.cpp(16) : error C2228:
left of '.g' must have class/struct/union type
        type is ''unknown-type''


I think that instead should be:

template <template <typename>  class U>
void f (const B<U> &)
{
  U<double>  v;
  v.g();
}

after this small change it compiles fine, and result is:
double

Regards


B.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Thorsten Ottosen
Thorsten Ottosen
Daniel Frey
Thorsten Ottosen
Daniel Frey
Thorsten Ottosen
Daniel Frey
Thorsten Ottosen
Guillaume Melquiond
Daniel Frey
Bronek Kozicki
Bronek Kozicki
Bronek Kozicki
Daniel Frey
Bronek Kozicki
Daniel Frey
Daniel Frey
Bronek Kozicki
Daniel Frey
Daniel Frey
Bronek Kozicki
Daniel Frey
Bronek Kozicki
Bronek Kozicki
Daniel Frey
Paul A Bristow
Paul A Bristow
Paul A Bristow
Paul A Bristow
Phil Richards
Daniel Frey
Paul A Bristow
David Abrahams
Paul A Bristow
David Abrahams

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved