$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Eric Ford (eford_at_[hidden])
Date: 2001-07-07 02:09:59
I'm working on a set of coordinate classes. Once I get them in shape,
I plan offer them here.
The idea is I want to allow the user to define a new coordinate system
just by adding the appropriate class and specializing a constructor
for some prexisting coordinate system using the new class as input.
Presently, I'm having a problem specializing a constructor...
I have the classes
template<int Dimension, class TraitsType =
coordinate_system_traits<Dimension> > class CartesianCoordinates;
template<int Dimension, class TraitsType =
coordinate_system_traits<Dimension> > class SphericalCoordinates;
Included is a constructor using a template for the argument...
template<template<> class OtherSystemType>
explicit CartesianCoordinates(OtherSystemType<Dimension,TraitsType>
const& x) throw();
Now I want to specialize that. Using pseduo-code, I'd like to do
something like:
template<class TraitsT>
CartesianCoordinates<3,TraitsT >(SphericalCoordinate<3,TraitsT>
const& x)
{ ... }
Unfortunately, that doesn't seem to work. I really don't want to have
to specialize template<class TraitsT> CartesianCoordinates<3,TraitsT>
when I just want to add one constructor. It appears I could also
solve this problem by eliminating the traits to the coordinate
system. But I don't like this option either.
Suggestions?
Thanks,
Eford