laugh.cpp:18:1: error: reference to 'data' is ambiguous
18 | data value(int l, int r)
| ^~~~
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from laugh.cpp:1:
/usr/include/c++/10/bits/range_access.h:319:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)'
319 | data(initializer_list<_Tp> __il) noexcept
| ^~~~
/usr/include/c++/10/bits/range_access.h:310:5: note: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
310 | data(_Tp (&__array)[_Nm]) noexcept
| ^~~~
/usr/include/c++/10/bits/range_access.h:300:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
300 | data(const _Container& __cont) noexcept(noexcept(__cont.data()))
| ^~~~
/usr/include/c++/10/bits/range_access.h:290:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
290 | data(_Container& __cont) noexcept(noexcept(__cont.data()))
| ^~~~
laugh.cpp:14:8: note: 'struct data'
14 | struct data
| ^~~~
laugh.cpp:48:5: error: ambiguating new declaration of 'long long int longest_laugh(std::string)'
48 | int longest_laugh(string s)
| ^~~~~~~~~~~~~
In file included from laugh.cpp:2:
laugh.h:5:5: note: old declaration 'int longest_laugh(std::string)'
5 | int longest_laugh(std::string s);
| ^~~~~~~~~~~~~
laugh.cpp: In function 'long long int longest_laugh(std::string)':
laugh.cpp:51:9: error: 'value' was not declared in this scope
51 | return value(0, life.length()-1).sub;
| ^~~~~