[Lemon-devel] Testing request

Alpár Jüttner alpar at cs.elte.hu
Tue Oct 7 08:32:42 CEST 2008


Very strange. Gcc does not compile LEMON  with this patch, and I think
gcc it right here for there are two contradicting declarations now. Two
ideas that we can try:
      * Declare the class first, then define the function wrappers
        immediately. In this way we can avoid the multiple occurrences
        of these functions
      * Declare/define one more overload instead of using default
        values.

Best regards,
Alpar


On Tue, 2008-10-07 at 00:41 +0100, Ladanyi, Akos wrote:
> Hi,
> 
> Revision 74eb8b425d82 compiles with Visual Studio 2005 and
> Visual Studio 2008 Express Edition if the attached patch is applied.
> 
> regards,
> Akos
> plain text document attachment (vs-compile.patch)
> # HG changeset patch
> # User Akos Ladanyi <ladanyi at tmit.bme.hu>
> # Date 1223335685 -3600
> # Node ID 350964b18e0dfb3187f6c94e784d91d5a0acedd0
> # Parent  74eb8b425d824650215e4028d7918db83a1306e9
> Fix compilation with Visual Studio 2005.
> 
> diff --git a/lemon/lgf_reader.h b/lemon/lgf_reader.h
> --- a/lemon/lgf_reader.h
> +++ b/lemon/lgf_reader.h
> @@ -392,8 +392,7 @@
>    class DigraphReader;
>  
>    template <typename Digraph>
> -  DigraphReader<Digraph> digraphReader(Digraph& digraph,
> -                                       std::istream& is = std::cin);
> +  DigraphReader<Digraph> digraphReader(Digraph& digraph, std::istream& is);
>  
>    template <typename Digraph>
>    DigraphReader<Digraph> digraphReader(Digraph& digraph, const std::string& fn);
> @@ -1225,8 +1224,7 @@
>    class GraphReader;
>  
>    template <typename Graph>
> -  GraphReader<Graph> graphReader(Graph& graph,
> -                                 std::istream& is = std::cin);
> +  GraphReader<Graph> graphReader(Graph& graph, std::istream& is);
>  
>    template <typename Graph>
>    GraphReader<Graph> graphReader(Graph& graph, const std::string& fn);
> diff --git a/lemon/lgf_writer.h b/lemon/lgf_writer.h
> --- a/lemon/lgf_writer.h
> +++ b/lemon/lgf_writer.h
> @@ -353,7 +353,7 @@
>  
>    template <typename Digraph>
>    DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
> -                                       std::ostream& os = std::cout);
> +                                       std::ostream& os);
>  
>    template <typename Digraph>
>    DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
> @@ -950,8 +950,7 @@
>    class GraphWriter;
>  
>    template <typename Graph>
> -  GraphWriter<Graph> graphWriter(const Graph& graph,
> -                                 std::ostream& os = std::cout);
> +  GraphWriter<Graph> graphWriter(const Graph& graph, std::ostream& os);
>  
>    template <typename Graph>
>    GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn);
> _______________________________________________
> Lemon-devel mailing list
> Lemon-devel at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-devel




More information about the Lemon-devel mailing list