$ cat main.cpp
#include <iostream>
#include <string>
//using namespace std;
using std::string;
string (&str(string s))[10];
typedef string sss[10];
sss &str1(string s);
auto str2(string s) -> string (&)[10];
string s1[10];
decltype(s1) &str3(string s);
using std::cout, std::endl;
int main() {
cout << typeid(str).name() << endl;
cout << typeid(str1).name() << endl;
cout << typeid(str2).name() << endl;
cout << typeid(str3).name() << endl;
return 0;
}
$ g++-debug -o main main.cpp
$ ./main
FRA10_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_E
FRA10_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_E
FRA10_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_E
FRA10_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_E
$ ./main | c++filt -t
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (&(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)) [10]
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (&(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)) [10]
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (&(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)) [10]
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (&(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)) [10]
$
|