Created
May 8, 2017 20:35
-
-
Save jacquelinekay/ce4acbe3907872d3f734ba1c33606d7c to your computer and use it in GitHub Desktop.
clang scelta build error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In file included from /home/jackie/code/scelta/example/error_handling.cpp:6: | |
In file included from /home/jackie/code/scelta/example/./example_utils.hpp:8: | |
In file included from /home/jackie/code/scelta/include/scelta.hpp:10: | |
In file included from /home/jackie/code/scelta/include/./scelta/support.hpp:8: | |
In file included from /home/jackie/code/scelta/include/./scelta/./support/variant.hpp:8: | |
In file included from /home/jackie/code/scelta/include/./scelta/./support/./variant/std.hpp:13: | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:235:46: error: cannot cast 'std::variant<io_outcome::success, io_outcome::not_found>' to its private base class 'std::__detail::__variant::_Variant_storage<false, io_outcome::success, io_outcome::not_found>' | |
return __get(std::in_place_index<_Np>, std::forward<_Variant>(__v)._M_u); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:1233:35: note: in instantiation of function template specialization 'std::__detail::__variant::__get<1, std::variant<io_outcome::success, io_outcome::not_found> >' requested here | |
return __detail::__variant::__get<_Np>(std::move(__v)); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:676:9: note: in instantiation of function template specialization 'std::get<1, io_outcome::success, io_outcome::not_found>' requested here | |
std::get<__indices>( | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:682:29: note: in instantiation of member function 'std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<int (*)(const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, std::variant<io_outcome::success, io_outcome::not_found> &&)>, std::tuple<std::variant<io_outcome::success, io_outcome::not_found> &&>, std::integer_sequence<unsigned long, 1> >::__visit_invoke' requested here | |
{ return _Array_type{&__visit_invoke}; } | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:659:53: note: in instantiation of member function 'std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<int (*)(const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, std::variant<io_outcome::success, io_outcome::not_found> &&)>, std::tuple<std::variant<io_outcome::success, io_outcome::not_found> &&>, std::integer_sequence<unsigned long, 1> >::_S_apply' requested here | |
std::index_sequence<__indices..., __index>>::_S_apply(); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:647:5: note: in instantiation of function template specialization 'std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<int (*)(const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, std::variant<io_outcome::success, io_outcome::not_found> &&), 2>, std::tuple<std::variant<io_outcome::success, io_outcome::not_found> &&>, std::integer_sequence<unsigned long> >::_S_apply_single_alt<1, std::__detail::__variant::_Multi_array<int (*)(const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, std::variant<io_outcome::success, io_outcome::not_found> &&)> >' requested here | |
(_S_apply_single_alt<__var_indices>( | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:637:2: note: (skipping 4 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) | |
_S_apply_all_alts( | |
^ | |
/home/jackie/code/scelta/include/./scelta/./support/./variant/std.hpp:16:58: note: in instantiation of function template specialization 'std::visit<const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, std::variant<io_outcome::success, io_outcome::not_found> >' requested here | |
SCELTA_DEFINE_HOMOGENIZER_VARIANT(::std::variant, ::std::visit) | |
^ | |
/home/jackie/code/scelta/include/./scelta/./support/./variant/../../utils/homogenizer.hpp:36:13: note: while substituting deduced template arguments into function template 'operator()' [with Ts = <const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, std::variant<io_outcome::success, io_outcome::not_found>>] | |
homogenizer_helper_t<std::decay_t<Variant>>{}( | |
^ | |
/home/jackie/code/scelta/include/./scelta/./recursive/../visitation/./visit.hpp:21:13: note: while substituting deduced template arguments into function template 'visit_homogenizer' [with Visitor = const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, Variant = std::variant<io_outcome::success, io_outcome::not_found>, Variants = <>] | |
impl::visit_homogenizer( | |
^ | |
/home/jackie/code/scelta/include/./scelta/./visitation/match.hpp:37:13: note: while substituting deduced template arguments into function template 'visit' [with Visitor = const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, Variant = std::variant<io_outcome::success, io_outcome::not_found>, Variants = <>] | |
DEFINE_BOUND_VISITOR_CALL(const Visitor&, const&) | |
^ | |
/home/jackie/code/scelta/include/./scelta/./visitation/match.hpp:30:13: note: expanded from macro 'DEFINE_BOUND_VISITOR_CALL' | |
visit(std::declval<m_visitor_type>(), FWD(variants)...) \ | |
^ | |
/home/jackie/code/scelta/example/error_handling.cpp:56:9: note: while substituting deduced template arguments into function template 'operator()' [with Variants = <std::variant<io_outcome::success, io_outcome::not_found>>] | |
(read_file(argv[1])); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:906:7: note: constrained by private inheritance here | |
: private __detail::__variant::_Variant_base<_Types...>, | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:235:74: error: '_M_u' is a private member of 'std::__detail::__variant::_Variant_storage<false, io_outcome::success, io_outcome::not_found>' | |
return __get(std::in_place_index<_Np>, std::forward<_Variant>(__v)._M_u); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:906:7: note: constrained by private inheritance here | |
: private __detail::__variant::_Variant_base<_Types...>, | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:356:34: note: member is declared here | |
_Variadic_union<_Types...> _M_u; | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:235:46: error: cannot cast 'std::variant<io_outcome::success, io_outcome::not_found>' to its private base class 'std::__detail::__variant::_Variant_storage<false, io_outcome::success, io_outcome::not_found>' | |
return __get(std::in_place_index<_Np>, std::forward<_Variant>(__v)._M_u); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:1233:35: note: in instantiation of function template specialization 'std::__detail::__variant::__get<0, std::variant<io_outcome::success, io_outcome::not_found> >' requested here | |
return __detail::__variant::__get<_Np>(std::move(__v)); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:676:9: note: in instantiation of function template specialization 'std::get<0, io_outcome::success, io_outcome::not_found>' requested here | |
std::get<__indices>( | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:682:29: note: in instantiation of member function 'std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<int (*)(const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, std::variant<io_outcome::success, io_outcome::not_found> &&)>, std::tuple<std::variant<io_outcome::success, io_outcome::not_found> &&>, std::integer_sequence<unsigned long, 0> >::__visit_invoke' requested here | |
{ return _Array_type{&__visit_invoke}; } | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:659:53: note: in instantiation of member function 'std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<int (*)(const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, std::variant<io_outcome::success, io_outcome::not_found> &&)>, std::tuple<std::variant<io_outcome::success, io_outcome::not_found> &&>, std::integer_sequence<unsigned long, 0> >::_S_apply' requested here | |
std::index_sequence<__indices..., __index>>::_S_apply(); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:647:5: note: in instantiation of function template specialization 'std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<int (*)(const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, std::variant<io_outcome::success, io_outcome::not_found> &&), 2>, std::tuple<std::variant<io_outcome::success, io_outcome::not_found> &&>, std::integer_sequence<unsigned long> >::_S_apply_single_alt<0, std::__detail::__variant::_Multi_array<int (*)(const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, std::variant<io_outcome::success, io_outcome::not_found> &&)> >' requested here | |
(_S_apply_single_alt<__var_indices>( | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:637:2: note: (skipping 4 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) | |
_S_apply_all_alts( | |
^ | |
/home/jackie/code/scelta/include/./scelta/./support/./variant/std.hpp:16:58: note: in instantiation of function template specialization 'std::visit<const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, std::variant<io_outcome::success, io_outcome::not_found> >' requested here | |
SCELTA_DEFINE_HOMOGENIZER_VARIANT(::std::variant, ::std::visit) | |
^ | |
/home/jackie/code/scelta/include/./scelta/./support/./variant/../../utils/homogenizer.hpp:36:13: note: while substituting deduced template arguments into function template 'operator()' [with Ts = <const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, std::variant<io_outcome::success, io_outcome::not_found>>] | |
homogenizer_helper_t<std::decay_t<Variant>>{}( | |
^ | |
/home/jackie/code/scelta/include/./scelta/./recursive/../visitation/./visit.hpp:21:13: note: while substituting deduced template arguments into function template 'visit_homogenizer' [with Visitor = const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, Variant = std::variant<io_outcome::success, io_outcome::not_found>, Variants = <>] | |
impl::visit_homogenizer( | |
^ | |
/home/jackie/code/scelta/include/./scelta/./visitation/match.hpp:37:13: note: while substituting deduced template arguments into function template 'visit' [with Visitor = const scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &, Variant = std::variant<io_outcome::success, io_outcome::not_found>, Variants = <>] | |
DEFINE_BOUND_VISITOR_CALL(const Visitor&, const&) | |
^ | |
/home/jackie/code/scelta/include/./scelta/./visitation/match.hpp:30:13: note: expanded from macro 'DEFINE_BOUND_VISITOR_CALL' | |
visit(std::declval<m_visitor_type>(), FWD(variants)...) \ | |
^ | |
/home/jackie/code/scelta/example/error_handling.cpp:56:9: note: while substituting deduced template arguments into function template 'operator()' [with Variants = <std::variant<io_outcome::success, io_outcome::not_found>>] | |
(read_file(argv[1])); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:906:7: note: constrained by private inheritance here | |
: private __detail::__variant::_Variant_base<_Types...>, | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:235:74: error: '_M_u' is a private member of 'std::__detail::__variant::_Variant_storage<false, io_outcome::success, io_outcome::not_found>' | |
return __get(std::in_place_index<_Np>, std::forward<_Variant>(__v)._M_u); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:906:7: note: constrained by private inheritance here | |
: private __detail::__variant::_Variant_base<_Types...>, | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:356:34: note: member is declared here | |
_Variadic_union<_Types...> _M_u; | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:235:46: error: cannot cast 'const std::variant<io_outcome::success, io_outcome::not_found>' to its private base class 'std::__detail::__variant::_Variant_storage<false, io_outcome::success, io_outcome::not_found>' | |
return __get(std::in_place_index<_Np>, std::forward<_Variant>(__v)._M_u); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:1255:35: note: in instantiation of function template specialization 'std::__detail::__variant::__get<1, const std::variant<io_outcome::success, io_outcome::not_found> >' requested here | |
return __detail::__variant::__get<_Np>(std::move(__v)); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:676:9: note: in instantiation of function template specialization 'std::get<1, io_outcome::success, io_outcome::not_found>' requested here | |
std::get<__indices>( | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:682:29: note: in instantiation of member function 'std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<int (*)(scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &&, std::variant<io_outcome::success, io_outcome::not_found> &&)>, std::tuple<std::variant<io_outcome::success, io_outcome::not_found> &&>, std::integer_sequence<unsigned long, 1> >::__visit_invoke' requested here | |
{ return _Array_type{&__visit_invoke}; } | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:659:53: note: in instantiation of member function 'std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<int (*)(scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &&, std::variant<io_outcome::success, io_outcome::not_found> &&)>, std::tuple<std::variant<io_outcome::success, io_outcome::not_found> &&>, std::integer_sequence<unsigned long, 1> >::_S_apply' requested here | |
std::index_sequence<__indices..., __index>>::_S_apply(); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:647:5: note: in instantiation of function template specialization 'std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<int (*)(scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &&, std::variant<io_outcome::success, io_outcome::not_found> &&), 2>, std::tuple<std::variant<io_outcome::success, io_outcome::not_found> &&>, std::integer_sequence<unsigned long> >::_S_apply_single_alt<1, std::__detail::__variant::_Multi_array<int (*)(scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &&, std::variant<io_outcome::success, io_outcome::not_found> &&)> >' requested here | |
(_S_apply_single_alt<__var_indices>( | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:637:2: note: (skipping 4 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) | |
_S_apply_all_alts( | |
^ | |
/home/jackie/code/scelta/include/./scelta/./support/./variant/std.hpp:16:58: note: in instantiation of function template specialization 'std::visit<scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)>, std::variant<io_outcome::success, io_outcome::not_found> >' requested here | |
SCELTA_DEFINE_HOMOGENIZER_VARIANT(::std::variant, ::std::visit) | |
^ | |
/home/jackie/code/scelta/include/./scelta/./support/./variant/../../utils/homogenizer.hpp:36:13: note: while substituting deduced template arguments into function template 'operator()' [with Ts = <scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)>, std::variant<io_outcome::success, io_outcome::not_found>>] | |
homogenizer_helper_t<std::decay_t<Variant>>{}( | |
^ | |
/home/jackie/code/scelta/include/./scelta/./recursive/../visitation/./visit.hpp:21:13: note: while substituting deduced template arguments into function template 'visit_homogenizer' [with Visitor = scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)>, Variant = std::variant<io_outcome::success, io_outcome::not_found>, Variants = <>] | |
impl::visit_homogenizer( | |
^ | |
/home/jackie/code/scelta/include/./scelta/./visitation/match.hpp:38:13: note: while substituting deduced template arguments into function template 'visit' [with Visitor = scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)>, Variant = std::variant<io_outcome::success, io_outcome::not_found>, Variants = <>] | |
DEFINE_BOUND_VISITOR_CALL(Visitor&&, &&) | |
^ | |
/home/jackie/code/scelta/include/./scelta/./visitation/match.hpp:30:13: note: expanded from macro 'DEFINE_BOUND_VISITOR_CALL' | |
visit(std::declval<m_visitor_type>(), FWD(variants)...) \ | |
^ | |
/home/jackie/code/scelta/example/error_handling.cpp:56:9: note: while substituting deduced template arguments into function template 'operator()' [with Variants = <std::variant<io_outcome::success, io_outcome::not_found>>] | |
(read_file(argv[1])); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:906:7: note: constrained by private inheritance here | |
: private __detail::__variant::_Variant_base<_Types...>, | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:235:74: error: '_M_u' is a private member of 'std::__detail::__variant::_Variant_storage<false, io_outcome::success, io_outcome::not_found>' | |
return __get(std::in_place_index<_Np>, std::forward<_Variant>(__v)._M_u); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:906:7: note: constrained by private inheritance here | |
: private __detail::__variant::_Variant_base<_Types...>, | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:356:34: note: member is declared here | |
_Variadic_union<_Types...> _M_u; | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:235:46: error: cannot cast 'const std::variant<io_outcome::success, io_outcome::not_found>' to its private base class 'std::__detail::__variant::_Variant_storage<false, io_outcome::success, io_outcome::not_found>' | |
return __get(std::in_place_index<_Np>, std::forward<_Variant>(__v)._M_u); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:1255:35: note: in instantiation of function template specialization 'std::__detail::__variant::__get<0, const std::variant<io_outcome::success, io_outcome::not_found> >' requested here | |
return __detail::__variant::__get<_Np>(std::move(__v)); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:676:9: note: in instantiation of function template specialization 'std::get<0, io_outcome::success, io_outcome::not_found>' requested here | |
std::get<__indices>( | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:682:29: note: in instantiation of member function 'std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<int (*)(scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &&, std::variant<io_outcome::success, io_outcome::not_found> &&)>, std::tuple<std::variant<io_outcome::success, io_outcome::not_found> &&>, std::integer_sequence<unsigned long, 0> >::__visit_invoke' requested here | |
{ return _Array_type{&__visit_invoke}; } | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:659:53: note: in instantiation of member function 'std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<int (*)(scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &&, std::variant<io_outcome::success, io_outcome::not_found> &&)>, std::tuple<std::variant<io_outcome::success, io_outcome::not_found> &&>, std::integer_sequence<unsigned long, 0> >::_S_apply' requested here | |
std::index_sequence<__indices..., __index>>::_S_apply(); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:647:5: note: in instantiation of function template specialization 'std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<int (*)(scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &&, std::variant<io_outcome::success, io_outcome::not_found> &&), 2>, std::tuple<std::variant<io_outcome::success, io_outcome::not_found> &&>, std::integer_sequence<unsigned long> >::_S_apply_single_alt<0, std::__detail::__variant::_Multi_array<int (*)(scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)> &&, std::variant<io_outcome::success, io_outcome::not_found> &&)> >' requested here | |
(_S_apply_single_alt<__var_indices>( | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:637:2: note: (skipping 4 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) | |
_S_apply_all_alts( | |
^ | |
/home/jackie/code/scelta/include/./scelta/./support/./variant/std.hpp:16:58: note: in instantiation of function template specialization 'std::visit<scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)>, std::variant<io_outcome::success, io_outcome::not_found> >' requested here | |
SCELTA_DEFINE_HOMOGENIZER_VARIANT(::std::variant, ::std::visit) | |
^ | |
/home/jackie/code/scelta/include/./scelta/./support/./variant/../../utils/homogenizer.hpp:36:13: note: while substituting deduced template arguments into function template 'operator()' [with Ts = <scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)>, std::variant<io_outcome::success, io_outcome::not_found>>] | |
homogenizer_helper_t<std::decay_t<Variant>>{}( | |
^ | |
/home/jackie/code/scelta/include/./scelta/./recursive/../visitation/./visit.hpp:21:13: note: while substituting deduced template arguments into function template 'visit_homogenizer' [with Visitor = scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)>, Variant = std::variant<io_outcome::success, io_outcome::not_found>, Variants = <>] | |
impl::visit_homogenizer( | |
^ | |
/home/jackie/code/scelta/include/./scelta/./visitation/match.hpp:38:13: note: while substituting deduced template arguments into function template 'visit' [with Visitor = scelta::overloader<(lambda at /home/jackie/code/scelta/example/error_handling.cpp:54:9), (lambda at /home/jackie/code/scelta/example/error_handling.cpp:55:9)>, Variant = std::variant<io_outcome::success, io_outcome::not_found>, Variants = <>] | |
DEFINE_BOUND_VISITOR_CALL(Visitor&&, &&) | |
^ | |
/home/jackie/code/scelta/include/./scelta/./visitation/match.hpp:30:13: note: expanded from macro 'DEFINE_BOUND_VISITOR_CALL' | |
visit(std::declval<m_visitor_type>(), FWD(variants)...) \ | |
^ | |
/home/jackie/code/scelta/example/error_handling.cpp:56:9: note: while substituting deduced template arguments into function template 'operator()' [with Variants = <std::variant<io_outcome::success, io_outcome::not_found>>] | |
(read_file(argv[1])); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:906:7: note: constrained by private inheritance here | |
: private __detail::__variant::_Variant_base<_Types...>, | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:235:74: error: '_M_u' is a private member of 'std::__detail::__variant::_Variant_storage<false, io_outcome::success, io_outcome::not_found>' | |
return __get(std::in_place_index<_Np>, std::forward<_Variant>(__v)._M_u); | |
^ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:906:7: note: constrained by private inheritance here | |
: private __detail::__variant::_Variant_base<_Types...>, | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/variant:356:34: note: member is declared here | |
_Variadic_union<_Types...> _M_u; | |
^ | |
8 errors generated. | |
make[2]: *** [example/CMakeFiles/example_error_handling.dir/error_handling.cpp.o] Error 1 | |
make[1]: *** [example/CMakeFiles/example_error_handling.dir/all] Error 2 | |
make: *** [all] Error 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got a similar error today with the libstdc++ version of std::variant when compiling with clang-SVN (gcc 7.1 works fine). I found the following LLVM bug report for it. FWIW, my example is too big for bug isolation, but it went away using Boost.Variant.