--- Begin Message ---
Package: g++-10
Version: 10.2.1-6
Severity: serious
Hi,
while rebuilding src:nheko I noticed an ICE with SEGFAULT.
I've somewhat minimized the testcase with delta (from 3.3 MB to 15 KB).
Build the attached code with
x86_64-linux-gnu-g++-10 -std=c++17 -Wno-return-type -c gcc-10-segfault.C
* it needs the -std=c++17 flag, without it no segfault occurs
* -Wno-return-type suppresses warnings caused by minimizing return statements
away
* it is a regression from GCC-9, which always accepts the code
* it does not segfault always, but very likely needs less than 5 repetitions
to result in segfault (out of 1000 test compiles 526 died with a segfault)
* there are two similar backtraces that may happen:
$ x86_64-linux-gnu-g++-10 -std=c++17 -Wno-return-type -c gcc-10-segfault.C
In file included from <command-line>:
/usr/include/stdc-predef.h: In substitution of 'template<class _Functor, class,
class> std::function<float(float, float, float)>::function(_Functor) [with
_Functor = <missing>; <template-parameter-1-2> = <missing>;
<template-parameter-1-3> = <missing>]':
gcc-10-segfault.C:283:12: required from 'static void
tweeny::detail::easingresolve<I, TypeTuple, FunctionTuple,
tweeny::easing::linearEasing, Fs ...>::impl(FunctionTuple&,
tweeny::easing::linearEasing, Fs ...) [with int I = 0; TypeTuple =
std::array<float, 1>; FunctionTuple = std::tuple<std::function<float(float,
float, float)> >; Fs = {}]'
gcc-10-segfault.C:289:64: required from 'void
tweeny::detail::easingfill(EasingCollectionT&, EasingT,
tweeny::detail::int2type<0>) [with TypeTupleT = std::array<float, 1>;
EasingCollectionT = std::tuple<std::function<float(float, float, float)> >;
EasingT = tweeny::easing::linearEasing]'
gcc-10-segfault.C:297:41: required from 'void
tweeny::detail::tweenpoint<Ts>::via(F) [with F = tweeny::easing::linearEasing;
Ts = {float}]'
gcc-10-segfault.C:294:5: required from
'tweeny::detail::tweenpoint<Ts>::tweenpoint(Ts ...) [with Ts = {float}]'
gcc-10-segfault.C:141:2: required from 'static constexpr
std::_Require<std::__and_<std::__not_<typename
std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type>,
std::is_constructible<_Tp, _Args ...> > >
std::allocator_traits<_Alloc>::_S_construct(_Alloc&, _Tp*, _Args&& ...) [with
_Tp = tweeny::detail::tweenpoint<float>; _Args = {float&}; _Alloc =
std::allocator<tweeny::detail::tweenpoint<float> >;
std::_Require<std::__and_<std::__not_<typename
std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type>,
std::is_constructible<_Tp, _Args ...> > > = void; typename
std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type =
std::integral_constant<bool, false>]'
gcc-10-segfault.C:144:14: required from 'static decltype
(std::allocator_traits<_Alloc>::_S_construct(__a, __p,
(forward<_Args>)(std::allocator_traits<_Alloc>::construct::__args)...))
std::allocator_traits<_Alloc>::construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp
= tweeny::detail::tweenpoint<float>; _Args = {float&}; _Alloc =
std::allocator<tweeny::detail::tweenpoint<float> >; decltype
(std::allocator_traits<_Alloc>::_S_construct(__a, __p,
(forward<_Args>)(std::allocator_traits<_Alloc>::construct::__args)...)) = void]'
gcc-10-segfault.C:224:26: required from 'std::vector<_Tp, _Alloc>::reference
std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {float&}; _Tp
= tweeny::detail::tweenpoint<float>; _Alloc =
std::allocator<tweeny::detail::tweenpoint<float> >; std::vector<_Tp,
_Alloc>::reference = tweeny::detail::tweenpoint<float>&]'
gcc-10-segfault.C:310:21: required from 'tweeny::tween<T>&
tweeny::tween<T>::to(T) [with T = float]'
gcc-10-segfault.C:322:47: required from here
/usr/include/stdc-predef.h:32:111: internal compiler error: Segmentation fault
32 | whether the overall intent is to support these features; otherwise,
|
^
33 | presume an older compiler has intent to support these features and
| ~~~~~
0xa65400 crash_signal
../../src/gcc/toplev.c:328
0x7f575b1ddd5f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xf09c3b append_to_statement_list_1
../../src/gcc/tree-iterator.c:65
0xf09c3b append_to_statement_list_force(tree_node*, tree_node**)
../../src/gcc/tree-iterator.c:105
0xf09c3b add_stmt(tree_node*)
../../src/gcc/cp/semantics.c:393
0x13a55c2 synthesize_method(tree_node*)
../../src/gcc/cp/method.c:1585
0x64cece maybe_instantiate_noexcept(tree_node*, int)
../../src/gcc/cp/pt.c:25338
0x768644 resolve_overloaded_unification
../../src/gcc/cp/pt.c:22255
0x768644 unify_one_argument
../../src/gcc/cp/pt.c:21801
0x111d442 type_unification_real
../../src/gcc/cp/pt.c:21945
0x111c93f fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool,
bool)
../../src/gcc/cp/pt.c:21325
0x111c02a add_template_candidate_real(z_candidate**, tree_node*, tree_node*,
tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed> const*, tree_node*,
tree_node*, tree_node*, int, tree_node*, unification_kind_t, int) [clone
.isra.0]
../../src/gcc/cp/call.c:3417
0xf538cd add_template_candidate
../../src/gcc/cp/call.c:3502
0xf538cd add_candidates
../../src/gcc/cp/call.c:5855
0x11289ec build_user_type_conversion_1
../../src/gcc/cp/call.c:4055
0xedc654 implicit_conversion
../../src/gcc/cp/call.c:2075
0x101b193 reference_binding
../../src/gcc/cp/call.c:1914
0xedc597 implicit_conversion
../../src/gcc/cp/call.c:2013
0xf5424d add_function_candidate
../../src/gcc/cp/call.c:2410
0xf53969 add_candidates
../../src/gcc/cp/call.c:5868
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
$ x86_64-linux-gnu-g++-10 -std=c++17 -Wno-return-type -c gcc-10-segfault.C
gcc-10-segfault.C: In substitution of 'template<class _Functor, class, class>
std::function<float(float, float, float)>::function(_Functor) [with _Functor =
<missing>; <template-parameter-1-2> = <missing>; <template-parameter-1-3> =
<missing>]':
gcc-10-segfault.C:283:12: required from 'static void
tweeny::detail::easingresolve<I, TypeTuple, FunctionTuple,
tweeny::easing::linearEasing, Fs ...>::impl(FunctionTuple&,
tweeny::easing::linearEasing, Fs ...) [with int I = 0; TypeTuple =
std::array<float, 1>; FunctionTuple = std::tuple<std::function<float(float,
float, float)> >; Fs = {}]'
gcc-10-segfault.C:289:64: required from 'void
tweeny::detail::easingfill(EasingCollectionT&, EasingT,
tweeny::detail::int2type<0>) [with TypeTupleT = std::array<float, 1>;
EasingCollectionT = std::tuple<std::function<float(float, float, float)> >;
EasingT = tweeny::easing::linearEasing]'
gcc-10-segfault.C:297:41: required from 'void
tweeny::detail::tweenpoint<Ts>::via(F) [with F = tweeny::easing::linearEasing;
Ts = {float}]'
gcc-10-segfault.C:294:5: required from
'tweeny::detail::tweenpoint<Ts>::tweenpoint(Ts ...) [with Ts = {float}]'
gcc-10-segfault.C:141:2: required from 'static constexpr
std::_Require<std::__and_<std::__not_<typename
std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type>,
std::is_constructible<_Tp, _Args ...> > >
std::allocator_traits<_Alloc>::_S_construct(_Alloc&, _Tp*, _Args&& ...) [with
_Tp = tweeny::detail::tweenpoint<float>; _Args = {float&}; _Alloc =
std::allocator<tweeny::detail::tweenpoint<float> >;
std::_Require<std::__and_<std::__not_<typename
std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type>,
std::is_constructible<_Tp, _Args ...> > > = void; typename
std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type =
std::integral_constant<bool, false>]'
gcc-10-segfault.C:144:14: required from 'static decltype
(std::allocator_traits<_Alloc>::_S_construct(__a, __p,
(forward<_Args>)(std::allocator_traits<_Alloc>::construct::__args)...))
std::allocator_traits<_Alloc>::construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp
= tweeny::detail::tweenpoint<float>; _Args = {float&}; _Alloc =
std::allocator<tweeny::detail::tweenpoint<float> >; decltype
(std::allocator_traits<_Alloc>::_S_construct(__a, __p,
(forward<_Args>)(std::allocator_traits<_Alloc>::construct::__args)...)) = void]'
gcc-10-segfault.C:224:26: required from 'std::vector<_Tp, _Alloc>::reference
std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {float&}; _Tp
= tweeny::detail::tweenpoint<float>; _Alloc =
std::allocator<tweeny::detail::tweenpoint<float> >; std::vector<_Tp,
_Alloc>::reference = tweeny::detail::tweenpoint<float>&]'
gcc-10-segfault.C:310:21: required from 'tweeny::tween<T>&
tweeny::tween<T>::to(T) [with T = float]'
gcc-10-segfault.C:322:47: required from here
gcc-10-segfault.C:283:12: internal compiler error: Segmentation fault
283 | get<I>(b) = easing::linear.run<ArgType>;
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0xa65400 crash_signal
../../src/gcc/toplev.c:328
0x7fa8b7dfed5f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x13a54ed synthesize_method(tree_node*)
../../src/gcc/cp/method.c:1536
0x64cece maybe_instantiate_noexcept(tree_node*, int)
../../src/gcc/cp/pt.c:25338
0x768644 resolve_overloaded_unification
../../src/gcc/cp/pt.c:22255
0x768644 unify_one_argument
../../src/gcc/cp/pt.c:21801
0x111d442 type_unification_real
../../src/gcc/cp/pt.c:21945
0x111c93f fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool,
bool)
../../src/gcc/cp/pt.c:21325
0x111c02a add_template_candidate_real(z_candidate**, tree_node*, tree_node*,
tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed> const*, tree_node*,
tree_node*, tree_node*, int, tree_node*, unification_kind_t, int) [clone
.isra.0]
../../src/gcc/cp/call.c:3417
0xf538cd add_template_candidate
../../src/gcc/cp/call.c:3502
0xf538cd add_candidates
../../src/gcc/cp/call.c:5855
0x11289ec build_user_type_conversion_1
../../src/gcc/cp/call.c:4055
0xedc654 implicit_conversion
../../src/gcc/cp/call.c:2075
0x101b193 reference_binding
../../src/gcc/cp/call.c:1914
0xedc597 implicit_conversion
../../src/gcc/cp/call.c:2013
0xf5424d add_function_candidate
../../src/gcc/cp/call.c:2410
0xf53969 add_candidates
../../src/gcc/cp/call.c:5868
0x1045831 add_operator_candidates
../../src/gcc/cp/call.c:5974
0xf5de70 build_new_op_1
../../src/gcc/cp/call.c:6182
0xf5d597 build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node**, int)
../../src/gcc/cp/call.c:6573
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
Andreas
namespace std {
typedef long unsigned int size_t;
template<typename _Tp, _Tp __v> struct integral_constant {
static constexpr _Tp value = __v;
typedef integral_constant<_Tp, __v> type;
};
typedef integral_constant<bool, true> true_type;
typedef integral_constant<bool, false> false_type;
template<bool __v> using __bool_constant = integral_constant<bool, __v>;
template<bool, typename, typename> struct conditional;
template<typename...> struct __and_;
template<typename _B1> struct __and_<_B1> : public _B1 {
};
template<typename _B1, typename _B2> struct __and_<_B1, _B2> : public
conditional<_B1::value, _B2, _B1>::type {
};
template<typename _Pp> struct __not_ : public
__bool_constant<!bool(_Pp::value)> {
};
template<typename _Tp> struct __success_type {
typedef _Tp type;
};
template<typename> struct remove_cv;
template<typename _Tp> using __remove_cv_t = typename remove_cv<_Tp>::type;
template<typename> struct __is_void_helper : public false_type {
};
template<typename _Tp> struct is_void : public
__is_void_helper<__remove_cv_t<_Tp>>::type {
};
template<typename> struct __is_integral_helper : public false_type {
};
template<typename _Tp> struct is_integral : public
__is_integral_helper<__remove_cv_t<_Tp>>::type {
};
template<typename> struct __is_member_object_pointer_helper : public
false_type {
};
template<typename _Tp> struct is_member_object_pointer : public
__is_member_object_pointer_helper<__remove_cv_t<_Tp>>::type {
};
template<typename> struct __is_member_function_pointer_helper : public
false_type {
};
template<typename _Tp> struct is_member_function_pointer : public
__is_member_function_pointer_helper<__remove_cv_t<_Tp>>::type {
};
template<typename _Tp> struct is_empty : public integral_constant<bool,
__is_empty(_Tp)> {
};
template<typename _Tp> _Tp __declval(long);
template<typename _Tp> auto declval() noexcept -> decltype(__declval<_Tp>(0));
template<typename _Tp, typename... _Args> struct __is_constructible_impl :
public __bool_constant<__is_constructible(_Tp, _Args...)> {
};
template<typename _Tp, typename... _Args> struct is_constructible : public
__is_constructible_impl<_Tp, _Args...> {
};
template<bool, typename _Tp, typename... _Args> struct
__is_nt_constructible_impl : public false_type {
};
template<typename _Tp, typename... _Args> using
__is_nothrow_constructible_impl =
__is_nt_constructible_impl<__is_constructible(_Tp, _Args...), _Tp, _Args...>;
template<typename _Tp, typename... _Args> struct is_nothrow_constructible :
public __is_nothrow_constructible_impl<_Tp, _Args...>::type {
};
template<typename _Tp, typename _Up> struct is_same : public
integral_constant<bool, __is_same_as(_Tp, _Up)> {
};
template<typename _Tp> struct remove_cv {
using type = _Tp;
};
template<typename _Tp> struct remove_reference {
typedef _Tp type;
};
template<bool, typename _Tp = void> struct enable_if {
};
template<typename _Tp> struct enable_if<true, _Tp> {
typedef _Tp type;
};
template<bool _Cond, typename _Tp = void> using __enable_if_t = typename
enable_if<_Cond, _Tp>::type;
template<typename... _Cond> using _Require =
__enable_if_t<__and_<_Cond...>::value>;
template<bool _Cond, typename _Iftrue, typename _Iffalse> struct conditional {
typedef _Iffalse type;
};
struct __invoke_other {
};
template<typename _Tp, typename _Tag> struct __result_of_success :
__success_type<_Tp> {
};
template<bool, bool, typename _Functor, typename... _ArgTypes> struct
__result_of_impl {
};
struct __result_of_other_impl {
template<typename _Fn, typename... _Args> static __result_of_success<decltype(
std::declval<_Fn>()(std::declval<_Args>()...) ), __invoke_other> _S_test(int);
};
template<typename _Functor, typename... _ArgTypes> struct
__result_of_impl<false, false, _Functor, _ArgTypes...> : private
__result_of_other_impl {
typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type;
};
template<typename _Functor, typename... _ArgTypes> struct __invoke_result :
public __result_of_impl< is_member_object_pointer< typename
remove_reference<_Functor>::type >::value, is_member_function_pointer< typename
remove_reference<_Functor>::type >::value, _Functor, _ArgTypes... >::type {
};
template<typename _Default, typename _AlwaysVoid, template<typename...> class
_Op, typename... _Args> struct __detector {
using type = _Default;
};
template<typename _Default, template<typename...> class _Op, typename...
_Args> using __detected_or = __detector<_Default, void, _Op, _Args...>;
template<typename _Default, template<typename...> class _Op, typename...
_Args> using __detected_or_t = typename __detected_or<_Default, _Op,
_Args...>::type;
template<typename _Result, typename _Ret, bool = is_void<_Ret>::value,
typename = void> struct __is_invocable_impl : false_type {
private: static typename _Result::type _S_get();
template<typename _Tp> static void _S_conv(_Tp);
template<typename _Tp, typename = decltype(_S_conv<_Tp>(_S_get()))> static
true_type _S_test(int);
public: using type = decltype(_S_test<_Ret>(1));
};
template<typename _Tp> constexpr _Tp&& forward(typename
std::remove_reference<_Tp>::type& __t) noexcept {
}
template<typename _Tp, typename _Up> struct __replace_first_arg {
};
template<typename _Ptr> struct pointer_traits {
template<typename _Up> using rebind = _Up*;
};
}
extern "C++" {
[[__nodiscard__]] inline void* operator new(std::size_t, void* __p) noexcept {
}
}
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
template<typename _Tp> class new_allocator {
};
}
namespace std {
template<typename _Tp> using __allocator_base = __gnu_cxx::new_allocator<_Tp>;
template<typename _Tp> class allocator : public __allocator_base<_Tp> {
public: typedef _Tp value_type;
template<typename _Tp1> struct rebind {
typedef allocator<_Tp1> other;
};
};
struct __allocator_traits_base {
template<typename _Tp, typename _Up, typename = void> struct __rebind :
__replace_first_arg<_Tp, _Up> {
using type = typename _Tp::template rebind<_Up>::other;
};
protected: template<typename _Tp> using __pointer = typename _Tp::pointer;
template<typename _Tp> using __c_pointer = typename _Tp::const_pointer;
};
template<typename _Alloc, typename _Up> using __alloc_rebind = typename
__allocator_traits_base::template __rebind<_Alloc, _Up>::type;
template<typename _Alloc> struct allocator_traits : __allocator_traits_base {
typedef typename _Alloc::value_type value_type;
using pointer = __detected_or_t<value_type*, __pointer, _Alloc>;
private: template<template<typename> class _Func, typename _Tp, typename =
void> struct _Ptr {
using type = typename pointer_traits<pointer>::template rebind<_Tp>;
};
public: using const_pointer = typename _Ptr<__c_pointer, const
value_type>::type;
template<typename _Tp> using rebind_alloc = __alloc_rebind<_Alloc, _Tp>;
template<typename _Tp, typename... _Args> struct __construct_helper {
template<typename> static false_type __test(...);
using type = decltype(__test<_Alloc>(0));
};
template<typename _Tp, typename... _Args> using __has_construct = typename
__construct_helper<_Tp, _Args...>::type;
template<typename _Tp, typename... _Args> static constexpr
_Require<__and_<__not_<__has_construct<_Tp, _Args...>>, is_constructible<_Tp,
_Args...>>> _S_construct(_Alloc&, _Tp* __p, _Args&&... __args)
noexcept(std::is_nothrow_constructible<_Tp, _Args...>::value) {
::new((void*)__p) _Tp(std::forward<_Args>(__args)...);
}
template<typename _Tp, typename... _Args> static auto construct(_Alloc& __a,
_Tp* __p, _Args&&... __args) noexcept(noexcept(_S_construct(__a, __p,
std::forward<_Args>(__args)...))) -> decltype(_S_construct(__a, __p,
std::forward<_Args>(__args)...)) {
_S_construct(__a, __p, std::forward<_Args>(__args)...);
}
};
}
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
template<typename _Alloc, typename = typename _Alloc::value_type> struct
__alloc_traits : std::allocator_traits<_Alloc> {
typedef std::allocator_traits<_Alloc> _Base_type;
typedef typename _Base_type::value_type value_type;
typedef value_type& reference;
template<typename _Tp> struct rebind {
typedef typename _Base_type::template rebind_alloc<_Tp> other;
};
};
}
namespace std __attribute__ ((__visibility__ ("default"))) {
template<std::size_t __i, typename _Tp> struct tuple_element;
template<std::size_t __i, typename _Tp> using __tuple_element_t = typename
tuple_element<__i, _Tp>::type;
template<typename _Tp, std::size_t _Nm> struct __array_traits {
typedef _Tp _Type[_Nm];
};
template<typename _Tp, std::size_t _Nm> struct array {
typedef std::__array_traits<_Tp, _Nm> _AT_Type;
typename _AT_Type::_Type _M_elems;
};
template<std::size_t _Int, typename _Tp, std::size_t _Nm> struct
tuple_element<_Int, std::array<_Tp, _Nm>> {
typedef _Tp type;
};
template<typename _Tp> struct __is_empty_non_tuple : is_empty<_Tp> {
};
template<typename _Tp> using __empty_not_final = typename
conditional<__is_final(_Tp), false_type, __is_empty_non_tuple<_Tp>>::type;
template<std::size_t _Idx, typename _Head, bool =
__empty_not_final<_Head>::value> struct _Head_base;
template<std::size_t _Idx, typename _Head> struct _Head_base<_Idx, _Head,
false> {
};
template<std::size_t _Idx, typename... _Elements> struct _Tuple_impl;
template<std::size_t _Idx, typename _Head> struct _Tuple_impl<_Idx, _Head> :
private _Head_base<_Idx, _Head> {
};
template<typename... _Elements> class tuple : public _Tuple_impl<0,
_Elements...> {
};
template<typename _Head, typename... _Tail> struct tuple_element<0,
tuple<_Head, _Tail...> > {
typedef _Head type;
};
template<std::size_t __i, typename... _Elements> constexpr
__tuple_element_t<__i, tuple<_Elements...>>& get(tuple<_Elements...>& __t)
noexcept {
}
template<typename _Res, typename... _ArgTypes> struct
_Maybe_unary_or_binary_function {
};
union [[gnu::may_alias]] _Any_data {
};
template<typename _Signature> class function;
class _Function_base {
};
template<typename _Res, typename... _ArgTypes> class
function<_Res(_ArgTypes...)> : public _Maybe_unary_or_binary_function<_Res,
_ArgTypes...>, private _Function_base {
template<typename _Func, typename _Res2 = __invoke_result<_Func&,
_ArgTypes...>> struct _Callable : __is_invocable_impl<_Res2, _Res>::type {
};
template<typename _Cond, typename _Tp> using _Requires = typename
enable_if<_Cond::value, _Tp>::type;
public: typedef _Res result_type;
template<typename _Functor, typename = _Requires<__not_<is_same<_Functor,
function>>, void>, typename = _Requires<_Callable<_Functor>, void>>
function(_Functor);
private: using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...);
_Invoker_type _M_invoker;
};
template<typename _Tp, typename _Alloc> struct _Vector_base {
typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template
rebind<_Tp>::other _Tp_alloc_type;
typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer pointer;
struct _Vector_impl_data {
pointer _M_finish;
pointer _M_end_of_storage;
};
struct _Vector_impl : public _Tp_alloc_type, public _Vector_impl_data {
};
public: _Vector_impl _M_impl;
};
template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class vector :
protected _Vector_base<_Tp, _Alloc> {
typedef _Vector_base<_Tp, _Alloc> _Base;
typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits;
public: typedef _Tp value_type;
typedef typename _Alloc_traits::reference reference;
template<typename... _Args> reference emplace_back(_Args&&... __args);
};
template<typename _Tp, typename _Alloc> template<typename... _Args> typename
vector<_Tp, _Alloc>::reference vector<_Tp, _Alloc>:: emplace_back(_Args&&...
__args) {
if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) {
_Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
std::forward<_Args>(__args)...);
}
}
typedef enum memory_order {
memory_order_relaxed, memory_order_consume, memory_order_acquire,
memory_order_release, memory_order_acq_rel, memory_order_seq_cst }
memory_order;
}
class __attribute__((visibility("default"))) QPaintDevice {
};
class __attribute__((visibility("default"))) QObject {
};
namespace tweeny {
template<typename T, typename... Ts> class tween;
namespace detail {
template<typename... Ts> struct equal {
enum {
value = true };
};
template<typename T, typename...> struct first {
typedef T type;
};
template<bool equal, typename... Ts> struct valuetype {
};
template<typename... Ts> struct valuetype<true, Ts...> {
typedef std::array<typename first<Ts...>::type, sizeof...(Ts)> type;
};
template<typename... Ts> struct tweentraits {
typedef std::tuple<std::function<Ts(float, Ts, Ts)>...> easingCollection;
typedef typename valuetype<equal<Ts...>::value, Ts...>::type valuesType;
};
template<typename... Ts> struct tweenpoint {
typedef detail::tweentraits<Ts...> traits;
typename traits::valuesType values;
typename traits::easingCollection easings;
tweenpoint(Ts... vs);
template<typename F> void via(F f);
};
}
class easing {
public: static constexpr struct linearEasing {
template<typename T> static typename
std::enable_if<std::is_integral<T>::value, T>::type run(float position, T
start, T end) {
}
template<typename T> static typename
std::enable_if<!std::is_integral<T>::value, T>::type run(float position, T
start, T end) {
}
}
linear = linearEasing{
};
static constexpr struct cubicOutEasing {
}
cubicOut = cubicOutEasing{
};
};
namespace detail {
using std::get;
template<int I, typename TypeTuple, typename FunctionTuple, typename... Fs>
struct easingresolve {
};
template<int I, typename TypeTuple, typename FunctionTuple, typename... Fs>
struct easingresolve<I, TypeTuple, FunctionTuple, easing::linearEasing, Fs...> {
typedef typename std::tuple_element<I, TypeTuple>::type ArgType;
static void impl(FunctionTuple &b, easing::linearEasing, Fs... fs) {
get<I>(b) = easing::linear.run<ArgType>;
}
};
template<std::size_t> struct int2type {
};
template<typename TypeTupleT, typename EasingCollectionT, typename EasingT>
void easingfill(EasingCollectionT & f, EasingT easing, int2type<0>) {
easingresolve<0, TypeTupleT, EasingCollectionT, EasingT>::impl(f, easing);
}
template<typename... Ts> inline tweenpoint<Ts...>::tweenpoint(Ts... vs) :
values{
vs...}
{
via(easing::linear);
}
template<typename... Ts> template<typename F> inline void
tweenpoint<Ts...>::via(F f) {
easingfill<typename traits::valuesType>(easings, f, int2type<sizeof...(Ts) -
1>{
}
);
}
}
template<typename T> class tween<T> {
public: static tween<T> from(T t);
tween<T> & to(T t);
template<typename... Fs> tween<T> & via(Fs... fs);
template<typename... Ds> tween<T> & during(Ds... ds);
std::vector<detail::tweenpoint<T>> points;
};
template<typename T> inline tween<T> & tween<T>::to(T t) {
points.emplace_back(t);
}
template<typename... Ts> tween<Ts...> from(Ts... vs);
};
class __attribute__((visibility("default"))) QWidget : public QObject, public
QPaintDevice {
};
class OverlayWidget : public QWidget {
};
class SnackBar : public OverlayWidget {
public: explicit SnackBar(QWidget *parent);
};
SnackBar::SnackBar(QWidget *parent) {
auto offset_anim =
tweeny::from(1.0f).to(0.0f).during(100).via(tweeny::easing::cubicOut);
}
--- End Message ---