New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure of msgpack_cpp11.cpp on g++6 #422
Comments
Could you tell me g++ version and libstdc++ version? |
Here's the full build log. |
g++6 defaults to |
Thank you for the information. I've just set up g++6 environment on my Linux 4.3.3-2-ARCH #1 SMP PREEMPT Wed Dec 23 20:09:18 CET 2015 x86_64 GNU/Linux. I reproduced the same compile error on the environment. I set I will start debugging on the environment. |
It seems that the compile error in not related to hppa and related to g++6. I updated the title of the issue. |
Here is a simple code that reproduces the error: #include <msgpack.hpp>
struct foo {
int i;
MSGPACK_DEFINE(i);
};
// `as` specialization for `foo`
namespace msgpack {
MSGPACK_API_VERSION_NAMESPACE(MSGPACK_DEFAULT_API_NS) {
namespace adaptor {
template <>
struct as<foo> {
foo operator()(msgpack::object const& o) const {
if (o.type != msgpack::type::ARRAY) throw msgpack::type_error();
if (o.via.array.size != 1) throw msgpack::type_error();
return foo {o.via.array.ptr[0].as<int>()};
}
};
} // adaptor
} // MSGPACK_API_VERSION_NAMESPACE(MSGPACK_DEFAULT_API_NS)
} // msgpack
int main() {
msgpack::object o;
auto val1 = o.as<std::tuple<foo>>(); // OK
auto val2 = o.as<msgpack::type::tuple<foo>>(); // ERROR
} |
The following code cannot compile on g++6. It seems that the cause of the issue. #include <tuple>
template <typename... Types>
struct my_tuple : std::tuple<Types...> {
// inheriting constructor
using std::tuple<Types...>::tuple;
};
int main() {
std::tuple<int> st;
my_tuple<int> mt(st);
} |
I reported the issue. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69853 |
Replaced the inheriting constructor with a forwarding constructor. Removed the template constructors that are covered by the forwarding constructor.
The issue I reported to gcc bugzilla is suspended. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69853#c2 |
Thanks, #426 compiles fine with the mock command on Fedora:
though the patch doesn't cleanly apply to the 1.4.0 release. Do you have any plan on the new release with it? |
@ueno, thank you for testing. I merged it.
It is due to #415. That PR is a preparation for version 2.0. It has been merged to the master branch. I created the branch named cpp-1.4, and will backport #426 and #423 to cpp-1.4. Then I will release that as version 1.4.1. |
The text was updated successfully, but these errors were encountered: