Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2002-03-01 05:36:41

Hi there,

while porting the format library to MSVC6 and STLport I encountered the following compiler bug:

namespace A {
  template<class T> struct foo{};
namespace B {
  using A::foo;
B::foo<int> bar; // error C2143: syntax error : missing ';' before '<'

The workaround is

using B::foo;
foo<int> bar;

I think we need a new config macro to describe this bug. BOOST_NO_USING_TEMPLATE_ACROSS_NAMESPACE perhaps?

The bug manifests itself when using iostreams in STLport wrapper mode and affects all iostream classes. Therefore I suggest to add the following to the STLport config file.

# define BOOST_IO_STD(x) x
# define BOOST_IO_STD(x) std::##x

This allows you to write a workaround like this.

namespace boost {
  using std::char_traits;

and in the code

namespace boost {
template<class charT, class Traits = BOOST_IO_STD(char_traits)<charT> > class basic_format;

instead of

namespace boost {
template<class charT, class Traits = std::char_traits<charT> > class basic_format;

Thoughts or comments, anyone?


Boost list run by bdawes at, gregod at, cpdaniel at, john at