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
[boost] Re: Re: [math constants] C++ Language gurus views needed andCodewarrior & Comeau testers
by Bronek Kozicki other posts by this author
Mar 7 2004 7:44PM messages near this date
[boost] Re: [math constants] C++ Language gurus views needed and Codewarrior & Comeau testers | Re: [boost] Re: [math constants] VC++ experts needed :)
On Sun, 7 Mar 2004 17:54:37 -0000, Paul A Bristow wrote:
>  Daniel Frey's constant library milestone 2
>  
>  /MathConstants/constant_library_m2_v1.tgz  21 Aug 2003

Ok, thanks. I have it. After some fixing (change file extension from .cc
to .cpp, change line endings from LF to CRLF, append one more directory
to INCLUDE) I received following error:

example.cpp(18) : error C3200: 'boost::math::pi_value<T> ' : invalid
template argument for template parameter 'F', expected a class template
        example.cpp(18) : see reference to class template instantiation
'boost::math::pi_value<T> ' being compiled
example.cpp(81) : fatal error C1903: unable to recover from previous
error(s); stopping compilation

I have stripped down problematic code to very simple:

#include <iostream> 

template <template <typename>  class F, typename T> struct constant_value
{
    T operator()() const
    {
        return T();
    }
};

template <typename T>  struct pi_value : constant_value <pi_value, T> {};

int main()
{
  pi_value<double>  t;
  std::cout << t();
}

and tried it under Comeau (online), with no problems. It also compiles
fine under GCC 3.3.1 (mingw). From my (limited) understanding of
templates this code is fine, thus apparently there's problem with VC71.
Looks like using template being just defined as template template
parameter makes VC71 confused. I reported it to Microsoft (on its
private newsgroup). 


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