[Boost-bugs] [Boost C++ Libraries] #13240: #include <boost/spirit/include/phoenix1.hpp> requires #include <complex> starting from boost 1.65.0

Subject: [Boost-bugs] [Boost C++ Libraries] #13240: #include <boost/spirit/include/phoenix1.hpp> requires #include <complex> starting from boost 1.65.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-10-02 13:34:47


#13240: #include <boost/spirit/include/phoenix1.hpp> requires #include <complex>
starting from boost 1.65.0
------------------------------+------------------------
 Reporter: anonymous | Owner: (none)
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
  Version: Boost 1.65.0 | Severity: Regression
 Keywords: |
------------------------------+------------------------
 Compiling
 {{{
 #include <boost/spirit/include/phoenix1.hpp>

 int main()
 {
     return 0;
 }
 }}}
 with
 {{{
 $ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.65.1/gcc-7.2.0/include
 -std=gnu++14
 }}}
 results in
 {{{
 In file included from
 /opt/wandbox/boost-1.65.0/gcc-7.2.0/include/boost/spirit/home/classic/phoenix.hpp:18:0,
                  from
 /opt/wandbox/boost-1.65.0/gcc-7.2.0/include/boost/spirit/include/phoenix1.hpp:11,
                  from prog.cc:1:
 /opt/wandbox/boost-1.65.0/gcc-7.2.0/include/boost/spirit/home/classic/phoenix/special_ops.hpp:62:48:
 error: 'complex' is not a member of 'std'
  template <typename T> struct rank<PHOENIX_STD::complex<T> >
                                                 ^~~~~~~
 /opt/wandbox/boost-1.65.0/gcc-7.2.0/include/boost/spirit/home/classic/phoenix/special_ops.hpp:62:48:
 error: 'complex' is not a member of 'std'
 /opt/wandbox/boost-1.65.0/gcc-7.2.0/include/boost/spirit/home/classic/phoenix/special_ops.hpp:62:57:
 error: template argument 1 is invalid
  template <typename T> struct rank<PHOENIX_STD::complex<T> >
                                                          ^
 /opt/wandbox/boost-1.65.0/gcc-7.2.0/include/boost/spirit/home/classic/phoenix/special_ops.hpp:62:59:
 error: expected unqualified-id before '>' token
  template <typename T> struct rank<PHOENIX_STD::complex<T> >
                                                            ^
 }}}

 Workaround to the problem is to #include <complex> before phoenix1.hpp but
 this should be probably done internally.

 On boost versions prior to 1.65.0 original code would compile w/o any
 errors (checked on wandbox.org).

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13240>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-10-02 13:40:26 UTC