Opened 8 years ago

Closed 8 years ago

#10768 closed Bugs (invalid)

Changes to Optional cause compilation errors in adjacency_list/named_graph since 1.56.0

Reported by: tastky <tastky@…> Owned by: Fernando Cacciola
Milestone: To Be Determined Component: optional
Version: Boost 1.57.0 Severity: Regression
Keywords: gcc optional graph bgl value_or adjacency_list Cc:

Description

Getting this since 1.56.0, now using 1.57.0 and GCC 4.9.2 on Arch. Code had compiled fine for months.

I never use anything from Optional in my code myself, nor does GCC mention any relevant lines in it, so I'm guessing the bug lies within boost.

In file included from /usr/include/boost/optional.hpp:15:0,
                 from /usr/include/boost/graph/named_graph.hpp:21,
                 from /usr/include/boost/graph/adjacency_list.hpp:45,
                 from ./Graph.h:6,
/usr/include/boost/optional/optional.hpp:1062:33: error: macro "value_or" requires 2 arguments, but only 1 given
     value_type value_or ( U&& v ) const&
                                 ^
/usr/include/boost/optional/optional.hpp:1071:33: error: macro "value_or" requires 2 arguments, but only 1 given
     value_type value_or ( U&& v ) &&

This repeats wherever adjacency_list.hpp is included. For each of these I then also get later…

/usr/include/boost/optional/optional.hpp:1062:35: error: expected initializer before ‘const’
     value_type value_or ( U&& v ) const&
                                   ^
/usr/include/boost/optional/optional.hpp:1071:35: error: expected initializer before ‘&&’ token
     value_type value_or ( U&& v ) &&

… with again no further context.

Change History (3)

comment:1 by akrzemi1, 8 years ago

Would you mind attaching a full (short) example that demonstrates the problem? When I include adjacency_list.hpp, I do not get these messages.

comment:2 by tastky@…, 8 years ago

Sorry for the noise, turned out to be a collision with another value_or from a different dependency (polylib). IOW, this bug is invalid.

comment:3 by akrzemi1, 8 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.