Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-12-14 17:50:16


| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of Daniel Frey
| Sent: Monday, December 08, 2003 10:10 PM
| To: boost_at_[hidden]
| Subject: [boost] [constant] Milestone 2 of the constant library added to
| files section
|
|
| Hi,
|
| I added milestone 2 of the constant library to the files section. It is a
| framework for representing constants like 'pi' with some advanced
| auto-type-selection. Please have a look at the code if you are
| interested. Some notes:
|
| - I split the code into several files. I hope this helps to get an
| overview about the different parts of the library.
|
| - Unlike former version, explicit type selection is now done like this:
|
| pi.operator T();
|
| where T is the type you need. Implicit conversions are supported as
| before.
|
| - The VC7.1 has not been tested, but it'll probably fail. At least the
| former versions did. If you can make it work, please tell me what I
| have to change. Tested are GCC 3.3.2 and Intel 7.1.

Your pessimism is justified :-((

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

MS VC 7.1 help says

Compiler Error C3200'template' : invalid template argument for template
parameter 'parameter', expected a class template

You passed an invalid argument to a class template. The class template expects
template as a parameter. Consider the following code:

// C3200.cpp
template<typename T>
class X
{
};

template<template<typename U> class T1, typename T2>
class Y
{
};

int main()
{
   Y<int, int> y; // C3200
}
Calling Y<int, int> aY will generate C3200. The first parameter needs to be a
template, for example, Y<X, int> aY.

Which is a bit of a show-stopper...

Any suggestions?

Paul

Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
mailto:pbristow_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk