Boost logo

Boost :

From: Christoph Ludwig (cludwig_at_[hidden])
Date: 2004-08-29 13:19:41

FYI: According to the regression tests, gcc 3.4.1 supports
boost::is_abstract<T>. Unfortunately, that does not hold if T is a
class template specialization, as exhibited by the following program:

  cludwig_at_lap200:~/C++/gcc3.4/tmp> cat ./
  #include <iostream>
  #include <iomanip>
  #include <boost/type_traits/is_abstract.hpp>
  template<typename T>
  class A {
    virtual void f() = 0;
  class B {
    virtual void f() = 0;
  int main() {
    std::cout << std::boolalpha;
    std::cout << "is_abstract< A<int> >::value == "
              << boost::is_abstract< A<int> >::value << '\n';
    std::cout << "is_abstract< B >::value == "
              << boost::is_abstract< B >::value << '\n';
  cludwig_at_lap200:~/C++/gcc3.4/tmp> ./is_abstract_test
  is_abstract< A<int> >::value == false
  is_abstract< B >::value == true

This causes problems, e.g., when using the serialization library with
class templates.

I entered the problem in the gcc bug database. It's PR#17232.



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