/ / Boost: niepoprawna liczba argumentów szablonu - c ++, boost

Zwiększ: błędna liczba argumentów szablonu - c ++, boost

Jestem całkiem nowy w C ++ i ulepszam bibliotekę: Nie jestem pewien, co robię źle w poniższym kodzie: Podążam za przykładem tutaj znalezionym http://www.richelbilderbeek.nl/CppBoostGraphExample4.htm

 typedef boost::adjacency_list
<
//Store all edges as a std::vector
boost::vecS,
//Store all vertices in a std::vector
boost::vecS,
//Relations are both ways (in this example)
//(note: but you can freely change it to boost::directedS)
boost::undirectedS,
//All vertices are person names of type std::string
boost::property<boost::vertex_name_t,std::string>,
//All edges are weights equal to the encounter frequencies
boost::property<boost::edge_weight_t,double>,
//Graph itself has a std::string name
boost::property<boost::graph_name_t,std::string>
> Graph;

Kiedy próbuję skompilować kod, otrzymuję

błąd: błędna liczba argumentów szablonu (1, powinno być 3) /usr/include/boost/pending/property.hpp:22 error: provided dla "tempate struct boost :: property"

W moim kodzie błąd wskazuje na tę linię:

boost::property<boost::edge_weight_t,double>

Używam wersji 1.55 biblioteki

Odpowiedzi:

1 dla odpowiedzi № 1

Wygląda na to, że zawiera ona niewłaściwą wersję nagłówka. Jeśli zaznaczysz ścieżkę do property.hpp nie znajduje ścieżki w boost_1_55_0 poddrzewo.

Kompiluje się tak, jak na moim systemie Ubuntu z Boost 1_55