|
Boost : |
From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-03-16 11:30:46
Hi.
When trying to use integer_traits on Intel C++ 7.0, I get the following
error (main line and branch):
boost/integer_traits.hpp(69): error: name followed by "::" must be a class
or namespace name
public detail::integer_traits_base<bool, false, true>
^
This is the compiler's way of saying that "integer_traits_base" is not known
at this point.
The structure of the header is like this:
--- Start ---
namespace boost {
template<class T>
class integer_traits : public std::numeric_limits<T>
// ...
namespace detail {
template<class T, T min_val, T max_val>
class integer_traits_base
// ...
} // namespace detail
template<>
class integer_traits<bool>
: public std::numeric_limits<bool>,
public detail::integer_traits_base<bool, false, true> // Error here
{ };
} // namespace boost
--- end ---
When moving the detail namespace and integer_traits_base above the
definition of integer_traits, the error disappears.
Could it be that when specialising templates, it only looks up the names in
the context of the primary template, not the context of the specialisation?
If this is the case, could this be fixed?
Regards,
Terje
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk