Build problem with uri_parts.hpp in C++ 17 / GCC 8 / Ubuntu 16.04

98 views
Skip to first unread message

dmytro....@gmail.com

unread,
Mar 24, 2019, 3:11:21 PM3/24/19
to The C++ Network Library
Greetings!

It is about release 0.13.

uri_parts.hpp, line 32:

        user_info = make_optional(iterator_range<FwdIter>(std::begin(host.get()),
                                            std::begin(host.get())));

Error is:
path/lib/cpp-netlib/boost/network/uri/detail/uri_parts.hpp:32:34: error: call of overloaded ‘make_optional(boost::iterator_range<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> > >)’ is ambiguous
         user_info = make_optional(iterator_range<FwdIter>(std::begin(host.get()),
                     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                             std::begin(host.get())));
                                             ~~~~~~~~~~~~~~~~~~~~~~~~


I use C++ 17 with #include <optional> also.
Adding boost:: prefix to make_optional resolves the problem.

Ubuntu 16.04, gcc 8, boost 1.69.

Will maintainers accept pull request ?

Thank you!



Dean Michael Berris

unread,
Mar 24, 2019, 11:38:20 PM3/24/19
to cpp-n...@googlegroups.com
Hi -- yes, I'd gladly accept a pull request to fix this!

Thanks for reporting and I look forward to the PR.

--
You received this message because you are subscribed to the Google Groups "The C++ Network Library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpp-netlib+...@googlegroups.com.
To post to this group, send email to cpp-n...@googlegroups.com.
Visit this group at https://groups.google.com/group/cpp-netlib.
For more options, visit https://groups.google.com/d/optout.

Dmytro Bogovych

unread,
Mar 25, 2019, 1:38:20 AM3/25/19
to cpp-n...@googlegroups.com
I checked master and 0.13-release branches (this time cloned from git) -
there is no problem in these sources. Master branch has no references to
make_optional in uri_parts.hpp at all; 0.13-release branch has ::boost
prefix already.

Before I used
http://downloads.cpp-netlib.org/0.13.0/cpp-netlib-0.13.0-final.tar.gz
link to get version 0.13. Seems archive is outdated a bit.
So I do not see any need in PR from my side...

Thank you :)
> <mailto:cpp-netlib+...@googlegroups.com>.
> To post to this group, send email to cpp-n...@googlegroups.com
> <mailto:cpp-n...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/cpp-netlib.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "The C++ Network Library" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cpp-netlib/4Yf9xruf9rY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> cpp-netlib+...@googlegroups.com
> <mailto:cpp-netlib+...@googlegroups.com>.
> To post to this group, send email to cpp-n...@googlegroups.com
> <mailto:cpp-n...@googlegroups.com>.

Dean Michael Berris

unread,
Mar 25, 2019, 2:09:43 AM3/25/19
to cpp-n...@googlegroups.com
Oh, right -- yes, I think this is one of those things which will
require I roll a 0.13.1 or something like that. :)

Thanks for checking and I'm happy this worked out for you. :D

Cheers
> To unsubscribe from this group and stop receiving emails from it, send an email to cpp-netlib+...@googlegroups.com.
> To post to this group, send email to cpp-n...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages