cpp-netlib/uri

Does not compile with gcc-8

Closed this issue · 1 comments

The boost-copied code causes the following errors:

[1/3] Building CXX object src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o
FAILED: src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o 
/usr/lib/ccache/bin/g++   -I../src -I../include -std=c++11 -Wall -Werror -MD -MT src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o -MF src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o.d -o src/CMakeFiles/network-uri.dir/detail/uri_resolve.cpp.o -c ../src/detail/uri_resolve.cpp
In file included from ../src/boost/mpl/aux_/na_assert.hpp:23,
                 from ../src/boost/mpl/arg.hpp:25,
                 from ../src/boost/mpl/placeholders.hpp:24,
                 from ../src/boost/iterator/iterator_categories.hpp:17,
                 from ../src/boost/iterator/iterator_facade.hpp:14,
                 from ../src/boost/range/iterator_range_core.hpp:27,
                 from ../src/detail/../boost/algorithm/string/find.hpp:16,
                 from ../src/detail/uri_resolve.cpp:17:
../src/boost/mpl/assert.hpp:188:21: error: unnecessary parentheses in declaration of ‘assert_arg’ [-Werror=parentheses]
 failed ************ (Pred::************
                     ^
../src/boost/mpl/assert.hpp:193:21: error: unnecessary parentheses in declaration of ‘assert_not_arg’ [-Werror=parentheses]
 failed ************ (network_boost::mpl::not_<Pred>::************
                     ^
cc1plus: all warnings being treated as errors
[2/3] Building CXX object src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o
FAILED: src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o 
/usr/lib/ccache/bin/g++   -I../src -I../include -std=c++11 -Wall -Werror -MD -MT src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o -MF src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o.d -o src/CMakeFiles/network-uri.dir/detail/uri_normalize.cpp.o -c ../src/detail/uri_normalize.cpp
In file included from ../src/boost/mpl/aux_/na_assert.hpp:23,
                 from ../src/boost/mpl/arg.hpp:25,
                 from ../src/boost/mpl/placeholders.hpp:24,
                 from ../src/boost/iterator/iterator_categories.hpp:17,
                 from ../src/boost/iterator/iterator_adaptor.hpp:14,
                 from ../src/boost/iterator/transform_iterator.hpp:12,
                 from ../src/boost/algorithm/string/iter_find.hpp:17,
                 from ../src/detail/../boost/algorithm/string/split.hpp:16,
                 from ../src/detail/uri_normalize.cpp:15:
../src/boost/mpl/assert.hpp:188:21: error: unnecessary parentheses in declaration of ‘assert_arg’ [-Werror=parentheses]
 failed ************ (Pred::************
                     ^
../src/boost/mpl/assert.hpp:193:21: error: unnecessary parentheses in declaration of ‘assert_not_arg’ [-Werror=parentheses]
 failed ************ (network_boost::mpl::not_<Pred>::************
                     ^
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.

This is with gcc-8.3.0 on Arch Linux.
Cmake args used: -DUri_BUILD_TESTS=OFF -DUri_BUILD_DOCS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON

Hi Yuval, thanks for the report.

I'm not going to support this repo for updated compilers. Instead, I'd like you to use the WhatWG compliant implementation which is supported for newer compilers.