boost graph WTF? [compilation]
От: nen777w  
Дата: 15.12.16 14:47
Оценка:
Осваиваю библиотеку.
Почему этот код НЕ компилируется???

#define BOOST_GRAPH_USE_SPIRIT_PARSER

#include <boost/graph/directed_graph.hpp>
#include <boost/graph/tiernan_all_cycles.hpp>
#include <boost/graph/properties.hpp>
#include <boost/graph/graphviz.hpp>


void    DBG_tiernan_all_cycles(std::istream &i, std::ostream &o)
{
    {
        typedef boost::directed_graph<> graph_t;
        typedef boost::graph_traits<graph_t>::vertex_descriptor vertex_t; //<<comment it
        typedef boost::graph_traits<graph_t>::edge_descriptor edge_t; //<<comment it

        graph_t g;
        boost::dynamic_properties dp;
        boost::read_graphviz(i, g, dp, "node_id");
    }


}

int main()
{
    DBG_tiernan_all_cycles(std::ifstream("t:\\ids_set.gv"), std::ofstream("t:\\ids_all_cycles.gv"));
    return 0;
}


В таком виде как я его привел он компилируется!
Но если закоментировать ОБЕ строчки после которых стит коментарий //<<comment it
Код компилироваться перестает: error C2872: 'detail': ambiguous symbol

Если только одну из них, неважно какую, то код будет компилироваться.
Что это за мистика???

Онлайн компилятор: http://rextester.com/KFOI67722
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.