COIN-OR::LEMON - Graph Library

Custom Query (545 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (25 - 27 of 545)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Ticket Resolution Summary Owner Reporter
#28 fixed Revise error.h and error_test.cc Balazs Dezso Peter Kovacs
Description

error_test.cc is not used as a test program in SVN and HG and it does not pass. So lemon/error.h and test/error_test.cc should be revised. At least in the HG repository.

#29 fixed Using \tparam doxygen command Peter Kovacs Peter Kovacs
Description

We should use \tparam for template parameter documentation.

#30 fixed Erroneous initialization of static members Peter Kovacs Akos Ladanyi
Description

Only static integral constant members can be initialized by adding a constant-expression initializer to their member declaration. In practice this means:

class Foo {
  public:
    static const int a = 5;       // this is ok
    static const double b = 1.5;  // this is not ok
                                  // (double is not an integral type)
};

The correct form:

class Foo {
  public:
    static const int a = 5;
    static const double b;
};

const double Foo::b = 1.5;    // this line goes to the .cc file

Note that if (and only if) you need to use an initialized member in a way that requires it to be stored as an object in memory, the member must be defined somewhere. This means that for example if you need to take the address of Foo::a then you need to define it like Foo:b but the initializer may not be repeated:

const int Foo::a;    // in the .cc file

In case Foo is a class template the syntax is a bit trickier:

template<typename T>
class Foo
{
  public: 
    static const int a = 5;
    static const double b;
};

template<typename T>
const double Foo<T>::b = 1.5;    // in the .h file

The above described problem occurs at the following places in the SVN tree:

  • lemon/cycle_canceling.h:128
  • lemon/network_simplex.h:284
  • lemon/network_simplex.h:345
  • lemon/network_simplex.h:346

You can find these by invoking g++ with the -ansi and -pedantic flags (and by running make check).

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Note: See TracQuery for help on using queries.