[gbc c++] Use std::allocator_traits to rebind
C++ codegen now uses C++11's `std::allocator_traits` for rebinding allocator types instead of the allocator's rebind.
This commit is contained in:
Родитель
9e349ff442
Коммит
d8d581f177
|
@ -23,6 +23,8 @@ different versioning scheme, following the Haskell community's
|
|||
|
||||
* Add service/method annotations in C# for Comm and gRPC.
|
||||
* Add service/method metadata support in C++ for gRPC.
|
||||
* C++ codegen now uses [`std::allocator_traits`](http://en.cppreference.com/w/cpp/memory/allocator_traits)
|
||||
for rebinding allocator types.
|
||||
|
||||
### C++ ###
|
||||
|
||||
|
|
|
@ -365,8 +365,8 @@ cppType (BT_UserDefined decl args) = declQualifiedTypeName decl <<>> (angles <$>
|
|||
|
||||
-- C++ type mapping with custom allocator
|
||||
cppTypeCustomAlloc :: Builder -> Type -> TypeNameBuilder
|
||||
cppTypeCustomAlloc alloc BT_String = pure $ "std::basic_string<char, std::char_traits<char>, typename " <> alloc <> "::rebind<char>::other>"
|
||||
cppTypeCustomAlloc alloc BT_WString = pure $ "std::basic_string<wchar_t, std::char_traits<wchar_t>, typename " <> alloc <> "::rebind<wchar_t>::other>"
|
||||
cppTypeCustomAlloc alloc BT_String = pure $ "std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<" <> alloc <> ">::template rebind_alloc<char> >"
|
||||
cppTypeCustomAlloc alloc BT_WString = pure $ "std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<" <> alloc <> ">::template rebind_alloc<wchar_t> >"
|
||||
cppTypeCustomAlloc alloc BT_MetaName = cppTypeCustomAlloc alloc BT_String
|
||||
cppTypeCustomAlloc alloc BT_MetaFullName = cppTypeCustomAlloc alloc BT_String
|
||||
cppTypeCustomAlloc alloc (BT_List element) = "std::list<" <>> elementTypeName element <<>> ", " <>> allocator alloc element <<> ">"
|
||||
|
@ -382,11 +382,11 @@ comparer t = ", std::less<" <>> elementTypeName t <<> ">, "
|
|||
|
||||
allocator :: Builder -> Type -> TypeNameBuilder
|
||||
allocator alloc element =
|
||||
"typename " <>> alloc <>> "::rebind<" <>> elementTypeName element <<> ">::other"
|
||||
"typename std::allocator_traits<" <>> alloc <>> ">::template rebind_alloc<" <>> elementTypeName element <<> ">"
|
||||
|
||||
pairAllocator :: Builder -> Type -> Type -> TypeNameBuilder
|
||||
pairAllocator alloc key value =
|
||||
"typename " <>> alloc <>> "::rebind<" <>> "std::pair<const " <>> elementTypeName key <<>> ", " <>> elementTypeName value <<> "> >::other"
|
||||
"typename std::allocator_traits<" <>> alloc <>> ">::template rebind_alloc<" <>> "std::pair<const " <>> elementTypeName key <<>> ", " <>> elementTypeName value <<> "> >"
|
||||
|
||||
cppSyntaxFix :: Builder -> Builder
|
||||
cppSyntaxFix = fromLazyText . snd . L.foldr fixInvalid (' ', mempty) . toLazyText
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace test
|
|||
0,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
std::list<bool, typename arena::rebind<bool>::other>,
|
||||
std::list<bool, typename std::allocator_traits<arena>::template rebind_alloc<bool> >,
|
||||
&foo::l,
|
||||
&s_l_metadata
|
||||
> {} l;
|
||||
|
@ -44,7 +44,7 @@ namespace test
|
|||
1,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
std::vector<bool, typename arena::rebind<bool>::other>,
|
||||
std::vector<bool, typename std::allocator_traits<arena>::template rebind_alloc<bool> >,
|
||||
&foo::v,
|
||||
&s_v_metadata
|
||||
> {} v;
|
||||
|
@ -54,7 +54,7 @@ namespace test
|
|||
2,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
std::set<bool, std::less<bool>, typename arena::rebind<bool>::other>,
|
||||
std::set<bool, std::less<bool>, typename std::allocator_traits<arena>::template rebind_alloc<bool> >,
|
||||
&foo::s,
|
||||
&s_s_metadata
|
||||
> {} s;
|
||||
|
@ -64,7 +64,7 @@ namespace test
|
|||
3,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
std::map<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, bool, std::less<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> >, typename arena::rebind<std::pair<const std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, bool> >::other>,
|
||||
std::map<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, bool, std::less<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > >, typename std::allocator_traits<arena>::template rebind_alloc<std::pair<const std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, bool> > >,
|
||||
&foo::m,
|
||||
&s_m_metadata
|
||||
> {} m;
|
||||
|
@ -74,7 +74,7 @@ namespace test
|
|||
4,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>,
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >,
|
||||
&foo::st,
|
||||
&s_st_metadata
|
||||
> {} st;
|
||||
|
@ -84,7 +84,7 @@ namespace test
|
|||
5,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>,
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >,
|
||||
&foo::d,
|
||||
&s_d_metadata
|
||||
> {} d;
|
||||
|
@ -94,7 +94,7 @@ namespace test
|
|||
10,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
::bond::maybe<std::list<bool, typename arena::rebind<bool>::other> >,
|
||||
::bond::maybe<std::list<bool, typename std::allocator_traits<arena>::template rebind_alloc<bool> > >,
|
||||
&foo::l1,
|
||||
&s_l1_metadata
|
||||
> {} l1;
|
||||
|
@ -104,7 +104,7 @@ namespace test
|
|||
11,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
::bond::maybe<std::vector<bool, typename arena::rebind<bool>::other> >,
|
||||
::bond::maybe<std::vector<bool, typename std::allocator_traits<arena>::template rebind_alloc<bool> > >,
|
||||
&foo::v1,
|
||||
&s_v1_metadata
|
||||
> {} v1;
|
||||
|
@ -114,7 +114,7 @@ namespace test
|
|||
12,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
::bond::maybe<std::set<bool, std::less<bool>, typename arena::rebind<bool>::other> >,
|
||||
::bond::maybe<std::set<bool, std::less<bool>, typename std::allocator_traits<arena>::template rebind_alloc<bool> > >,
|
||||
&foo::s1,
|
||||
&s_s1_metadata
|
||||
> {} s1;
|
||||
|
@ -124,7 +124,7 @@ namespace test
|
|||
13,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
::bond::maybe<std::map<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, bool, std::less<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> >, typename arena::rebind<std::pair<const std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, bool> >::other> >,
|
||||
::bond::maybe<std::map<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, bool, std::less<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > >, typename std::allocator_traits<arena>::template rebind_alloc<std::pair<const std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, bool> > > >,
|
||||
&foo::m1,
|
||||
&s_m1_metadata
|
||||
> {} m1;
|
||||
|
@ -134,7 +134,7 @@ namespace test
|
|||
14,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
::bond::maybe<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> >,
|
||||
::bond::maybe<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > >,
|
||||
&foo::st1,
|
||||
&s_st1_metadata
|
||||
> {} st1;
|
||||
|
|
|
@ -21,17 +21,17 @@ namespace test
|
|||
|
||||
struct foo
|
||||
{
|
||||
std::list<bool, typename arena::rebind<bool>::other> l;
|
||||
std::vector<bool, typename arena::rebind<bool>::other> v;
|
||||
std::set<bool, std::less<bool>, typename arena::rebind<bool>::other> s;
|
||||
std::map<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, bool, std::less<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> >, typename arena::rebind<std::pair<const std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, bool> >::other> m;
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> st;
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> d;
|
||||
::bond::maybe<std::list<bool, typename arena::rebind<bool>::other> > l1;
|
||||
::bond::maybe<std::vector<bool, typename arena::rebind<bool>::other> > v1;
|
||||
::bond::maybe<std::set<bool, std::less<bool>, typename arena::rebind<bool>::other> > s1;
|
||||
::bond::maybe<std::map<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, bool, std::less<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> >, typename arena::rebind<std::pair<const std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, bool> >::other> > m1;
|
||||
::bond::maybe<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> > st1;
|
||||
std::list<bool, typename std::allocator_traits<arena>::template rebind_alloc<bool> > l;
|
||||
std::vector<bool, typename std::allocator_traits<arena>::template rebind_alloc<bool> > v;
|
||||
std::set<bool, std::less<bool>, typename std::allocator_traits<arena>::template rebind_alloc<bool> > s;
|
||||
std::map<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, bool, std::less<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > >, typename std::allocator_traits<arena>::template rebind_alloc<std::pair<const std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, bool> > > m;
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > st;
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > d;
|
||||
::bond::maybe<std::list<bool, typename std::allocator_traits<arena>::template rebind_alloc<bool> > > l1;
|
||||
::bond::maybe<std::vector<bool, typename std::allocator_traits<arena>::template rebind_alloc<bool> > > v1;
|
||||
::bond::maybe<std::set<bool, std::less<bool>, typename std::allocator_traits<arena>::template rebind_alloc<bool> > > s1;
|
||||
::bond::maybe<std::map<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, bool, std::less<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > >, typename std::allocator_traits<arena>::template rebind_alloc<std::pair<const std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, bool> > > > m1;
|
||||
::bond::maybe<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > > st1;
|
||||
|
||||
struct _bond_vc12_ctor_workaround_ {};
|
||||
template <int = 0> // Workaround to avoid compilation if not used
|
||||
|
@ -70,13 +70,13 @@ namespace test
|
|||
: l(allocator),
|
||||
v(allocator),
|
||||
s(std::less<bool>(), allocator),
|
||||
m(std::less<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>>(), allocator),
|
||||
m(std::less<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >>(), allocator),
|
||||
st(allocator),
|
||||
d("foo", allocator),
|
||||
l1(allocator),
|
||||
v1(allocator),
|
||||
s1(std::less<bool>(), allocator),
|
||||
m1(std::less<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>>(), allocator),
|
||||
m1(std::less<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >>(), allocator),
|
||||
st1(allocator)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace test
|
|||
0,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
std::map<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, int32_t, std::less<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> >, typename arena::rebind<std::pair<const std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, int32_t> >::other>,
|
||||
std::map<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, int32_t, std::less<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > >, typename std::allocator_traits<arena>::template rebind_alloc<std::pair<const std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, int32_t> > >,
|
||||
&foo::m,
|
||||
&s_m_metadata
|
||||
> {} m;
|
||||
|
@ -35,7 +35,7 @@ namespace test
|
|||
1,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
foo,
|
||||
std::set<int32_t, std::less<int32_t>, typename arena::rebind<int32_t>::other>,
|
||||
std::set<int32_t, std::less<int32_t>, typename std::allocator_traits<arena>::template rebind_alloc<int32_t> >,
|
||||
&foo::s,
|
||||
&s_s_metadata
|
||||
> {} s;
|
||||
|
|
|
@ -21,8 +21,8 @@ namespace test
|
|||
|
||||
struct foo
|
||||
{
|
||||
std::map<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, int32_t, std::less<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> >, typename arena::rebind<std::pair<const std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, int32_t> >::other> m;
|
||||
std::set<int32_t, std::less<int32_t>, typename arena::rebind<int32_t>::other> s;
|
||||
std::map<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, int32_t, std::less<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > >, typename std::allocator_traits<arena>::template rebind_alloc<std::pair<const std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, int32_t> > > m;
|
||||
std::set<int32_t, std::less<int32_t>, typename std::allocator_traits<arena>::template rebind_alloc<int32_t> > s;
|
||||
|
||||
struct _bond_vc12_ctor_workaround_ {};
|
||||
template <int = 0> // Workaround to avoid compilation if not used
|
||||
|
@ -48,7 +48,7 @@ namespace test
|
|||
|
||||
explicit
|
||||
foo(const arena& allocator)
|
||||
: m(std::less<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>>(), allocator),
|
||||
: m(std::less<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >>(), allocator),
|
||||
s(std::less<int32_t>(), allocator)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace tests
|
|||
0,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
Foo<T>,
|
||||
std::vector<std::vector<T, typename arena::rebind<T>::other>, typename arena::rebind<std::vector<T, typename arena::rebind<T>::other> >::other>,
|
||||
std::vector<std::vector<T, typename std::allocator_traits<arena>::template rebind_alloc<T> >, typename std::allocator_traits<arena>::template rebind_alloc<std::vector<T, typename std::allocator_traits<arena>::template rebind_alloc<T> > > >,
|
||||
&Foo<T>::aa,
|
||||
&s_aa_metadata
|
||||
> {} aa;
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace tests
|
|||
template <typename T>
|
||||
struct Foo
|
||||
{
|
||||
std::vector<std::vector<T, typename arena::rebind<T>::other>, typename arena::rebind<std::vector<T, typename arena::rebind<T>::other> >::other> aa;
|
||||
std::vector<std::vector<T, typename std::allocator_traits<arena>::template rebind_alloc<T> >, typename std::allocator_traits<arena>::template rebind_alloc<std::vector<T, typename std::allocator_traits<arena>::template rebind_alloc<T> > > > aa;
|
||||
|
||||
struct _bond_vc12_ctor_workaround_ {};
|
||||
template <int = 0> // Workaround to avoid compilation if not used
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace tests
|
|||
0,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
Foo,
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>,
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >,
|
||||
&Foo::f,
|
||||
&s_f_metadata
|
||||
> {} f;
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace tests
|
|||
|
||||
struct Foo
|
||||
{
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> f;
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > f;
|
||||
|
||||
struct _bond_vc12_ctor_workaround_ {};
|
||||
template <int = 0> // Workaround to avoid compilation if not used
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace tests
|
|||
2,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
BasicTypes,
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>,
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >,
|
||||
&BasicTypes::_str,
|
||||
&s__str_metadata
|
||||
> {} _str;
|
||||
|
@ -57,7 +57,7 @@ namespace tests
|
|||
3,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
BasicTypes,
|
||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other>,
|
||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> >,
|
||||
&BasicTypes::_wstr,
|
||||
&s__wstr_metadata
|
||||
> {} _wstr;
|
||||
|
|
|
@ -22,8 +22,8 @@ namespace tests
|
|||
struct BasicTypes
|
||||
{
|
||||
bool _bool;
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> _str;
|
||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other> _wstr;
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > _str;
|
||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> > _wstr;
|
||||
uint64_t _uint64;
|
||||
uint16_t _uint16;
|
||||
uint32_t _uint32;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace bondmeta
|
|||
0,
|
||||
::bond::reflection::required_optional_field_modifier,
|
||||
HasMetaFields,
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>,
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >,
|
||||
&HasMetaFields::full_name,
|
||||
&s_full_name_metadata
|
||||
> {} full_name;
|
||||
|
@ -37,7 +37,7 @@ namespace bondmeta
|
|||
1,
|
||||
::bond::reflection::required_optional_field_modifier,
|
||||
HasMetaFields,
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>,
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >,
|
||||
&HasMetaFields::name,
|
||||
&s_name_metadata
|
||||
> {} name;
|
||||
|
|
|
@ -23,8 +23,8 @@ namespace bondmeta
|
|||
|
||||
struct HasMetaFields
|
||||
{
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> full_name;
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> name;
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > full_name;
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > name;
|
||||
|
||||
struct _bond_vc12_ctor_workaround_ {};
|
||||
template <int = 0> // Workaround to avoid compilation if not used
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace tests
|
|||
0,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
ComplexTypes,
|
||||
std::list<int8_t, typename arena::rebind<int8_t>::other>,
|
||||
std::list<int8_t, typename std::allocator_traits<arena>::template rebind_alloc<int8_t> >,
|
||||
&ComplexTypes::li8,
|
||||
&s_li8_metadata
|
||||
> {} li8;
|
||||
|
@ -68,7 +68,7 @@ namespace tests
|
|||
1,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
ComplexTypes,
|
||||
std::set<bool, std::less<bool>, typename arena::rebind<bool>::other>,
|
||||
std::set<bool, std::less<bool>, typename std::allocator_traits<arena>::template rebind_alloc<bool> >,
|
||||
&ComplexTypes::sb,
|
||||
&s_sb_metadata
|
||||
> {} sb;
|
||||
|
@ -78,7 +78,7 @@ namespace tests
|
|||
2,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
ComplexTypes,
|
||||
std::vector< ::bond::blob, typename arena::rebind< ::bond::blob>::other>,
|
||||
std::vector< ::bond::blob, typename std::allocator_traits<arena>::template rebind_alloc< ::bond::blob> >,
|
||||
&ComplexTypes::vb,
|
||||
&s_vb_metadata
|
||||
> {} vb;
|
||||
|
@ -98,7 +98,7 @@ namespace tests
|
|||
4,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
ComplexTypes,
|
||||
std::map<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other>, std::less<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> >, typename arena::rebind<std::pair<const std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other> > >::other>,
|
||||
std::map<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> >, std::less<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > >, typename std::allocator_traits<arena>::template rebind_alloc<std::pair<const std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> > > > >,
|
||||
&ComplexTypes::msws,
|
||||
&s_msws_metadata
|
||||
> {} msws;
|
||||
|
@ -118,7 +118,7 @@ namespace tests
|
|||
6,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
ComplexTypes,
|
||||
std::map<double, std::list<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename arena::rebind< ::bond::nullable< ::bond::bonded< ::tests::Bar> > >::other>, typename arena::rebind<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename arena::rebind< ::bond::nullable< ::bond::bonded< ::tests::Bar> > >::other> >::other>, std::less<double>, typename arena::rebind<std::pair<const double, std::list<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename arena::rebind< ::bond::nullable< ::bond::bonded< ::tests::Bar> > >::other>, typename arena::rebind<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename arena::rebind< ::bond::nullable< ::bond::bonded< ::tests::Bar> > >::other> >::other> > >::other>,
|
||||
std::map<double, std::list<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename std::allocator_traits<arena>::template rebind_alloc< ::bond::nullable< ::bond::bonded< ::tests::Bar> > > >, typename std::allocator_traits<arena>::template rebind_alloc<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename std::allocator_traits<arena>::template rebind_alloc< ::bond::nullable< ::bond::bonded< ::tests::Bar> > > > > >, std::less<double>, typename std::allocator_traits<arena>::template rebind_alloc<std::pair<const double, std::list<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename std::allocator_traits<arena>::template rebind_alloc< ::bond::nullable< ::bond::bonded< ::tests::Bar> > > >, typename std::allocator_traits<arena>::template rebind_alloc<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename std::allocator_traits<arena>::template rebind_alloc< ::bond::nullable< ::bond::bonded< ::tests::Bar> > > > > > > > >,
|
||||
&ComplexTypes::m,
|
||||
&s_m_metadata
|
||||
> {} m;
|
||||
|
|
|
@ -86,13 +86,13 @@ namespace tests
|
|||
|
||||
struct ComplexTypes
|
||||
{
|
||||
std::list<int8_t, typename arena::rebind<int8_t>::other> li8;
|
||||
std::set<bool, std::less<bool>, typename arena::rebind<bool>::other> sb;
|
||||
std::vector< ::bond::blob, typename arena::rebind< ::bond::blob>::other> vb;
|
||||
std::list<int8_t, typename std::allocator_traits<arena>::template rebind_alloc<int8_t> > li8;
|
||||
std::set<bool, std::less<bool>, typename std::allocator_traits<arena>::template rebind_alloc<bool> > sb;
|
||||
std::vector< ::bond::blob, typename std::allocator_traits<arena>::template rebind_alloc< ::bond::blob> > vb;
|
||||
::bond::nullable<float> nf;
|
||||
std::map<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other>, std::less<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> >, typename arena::rebind<std::pair<const std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>, std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other> > >::other> msws;
|
||||
std::map<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> >, std::less<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > >, typename std::allocator_traits<arena>::template rebind_alloc<std::pair<const std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >, std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> > > > > msws;
|
||||
::bond::bonded< ::tests::Foo> bfoo;
|
||||
std::map<double, std::list<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename arena::rebind< ::bond::nullable< ::bond::bonded< ::tests::Bar> > >::other>, typename arena::rebind<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename arena::rebind< ::bond::nullable< ::bond::bonded< ::tests::Bar> > >::other> >::other>, std::less<double>, typename arena::rebind<std::pair<const double, std::list<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename arena::rebind< ::bond::nullable< ::bond::bonded< ::tests::Bar> > >::other>, typename arena::rebind<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename arena::rebind< ::bond::nullable< ::bond::bonded< ::tests::Bar> > >::other> >::other> > >::other> m;
|
||||
std::map<double, std::list<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename std::allocator_traits<arena>::template rebind_alloc< ::bond::nullable< ::bond::bonded< ::tests::Bar> > > >, typename std::allocator_traits<arena>::template rebind_alloc<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename std::allocator_traits<arena>::template rebind_alloc< ::bond::nullable< ::bond::bonded< ::tests::Bar> > > > > >, std::less<double>, typename std::allocator_traits<arena>::template rebind_alloc<std::pair<const double, std::list<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename std::allocator_traits<arena>::template rebind_alloc< ::bond::nullable< ::bond::bonded< ::tests::Bar> > > >, typename std::allocator_traits<arena>::template rebind_alloc<std::vector< ::bond::nullable< ::bond::bonded< ::tests::Bar> >, typename std::allocator_traits<arena>::template rebind_alloc< ::bond::nullable< ::bond::bonded< ::tests::Bar> > > > > > > > > m;
|
||||
|
||||
struct _bond_vc12_ctor_workaround_ {};
|
||||
template <int = 0> // Workaround to avoid compilation if not used
|
||||
|
@ -127,7 +127,7 @@ namespace tests
|
|||
sb(std::less<bool>(), allocator),
|
||||
vb(allocator),
|
||||
nf(),
|
||||
msws(std::less<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>>(), allocator),
|
||||
msws(std::less<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >>(), allocator),
|
||||
m(std::less<double>(), allocator)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace tests
|
|||
3,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
Foo,
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>,
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >,
|
||||
&Foo::m_str_1,
|
||||
&s_m_str_1_metadata
|
||||
> {} m_str_1;
|
||||
|
@ -99,7 +99,7 @@ namespace tests
|
|||
4,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
Foo,
|
||||
::bond::maybe<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> >,
|
||||
::bond::maybe<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > >,
|
||||
&Foo::m_str_2,
|
||||
&s_m_str_2_metadata
|
||||
> {} m_str_2;
|
||||
|
@ -399,7 +399,7 @@ namespace tests
|
|||
34,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
Foo,
|
||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other>,
|
||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> >,
|
||||
&Foo::m_wstr_1,
|
||||
&s_m_wstr_1_metadata
|
||||
> {} m_wstr_1;
|
||||
|
@ -409,7 +409,7 @@ namespace tests
|
|||
35,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
Foo,
|
||||
::bond::maybe<std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other> >,
|
||||
::bond::maybe<std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> > >,
|
||||
&Foo::m_wstr_2,
|
||||
&s_m_wstr_2_metadata
|
||||
> {} m_wstr_2;
|
||||
|
|
|
@ -108,8 +108,8 @@ namespace tests
|
|||
bool m_bool_1;
|
||||
bool m_bool_2;
|
||||
::bond::maybe<bool> m_bool_3;
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> m_str_1;
|
||||
::bond::maybe<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> > m_str_2;
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > m_str_1;
|
||||
::bond::maybe<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > > m_str_2;
|
||||
int8_t m_int8_4;
|
||||
::bond::maybe<int8_t> m_int8_5;
|
||||
int16_t m_int16_4;
|
||||
|
@ -139,8 +139,8 @@ namespace tests
|
|||
::tests::EnumType1 m_enum_int32max;
|
||||
::tests::EnumType1 m_enum_uint32_min;
|
||||
::tests::EnumType1 m_enum_uint32_max;
|
||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other> m_wstr_1;
|
||||
::bond::maybe<std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other> > m_wstr_2;
|
||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> > m_wstr_1;
|
||||
::bond::maybe<std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> > > m_wstr_2;
|
||||
|
||||
struct _bond_vc12_ctor_workaround_ {};
|
||||
template <int = 0> // Workaround to avoid compilation if not used
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace tests
|
|||
3,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
Foo,
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other>,
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> >,
|
||||
&Foo::m_str_1,
|
||||
&s_m_str_1_metadata
|
||||
> {} m_str_1;
|
||||
|
@ -99,7 +99,7 @@ namespace tests
|
|||
4,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
Foo,
|
||||
::bond::maybe<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> >,
|
||||
::bond::maybe<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > >,
|
||||
&Foo::m_str_2,
|
||||
&s_m_str_2_metadata
|
||||
> {} m_str_2;
|
||||
|
@ -399,7 +399,7 @@ namespace tests
|
|||
34,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
Foo,
|
||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other>,
|
||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> >,
|
||||
&Foo::m_wstr_1,
|
||||
&s_m_wstr_1_metadata
|
||||
> {} m_wstr_1;
|
||||
|
@ -409,7 +409,7 @@ namespace tests
|
|||
35,
|
||||
::bond::reflection::optional_field_modifier,
|
||||
Foo,
|
||||
::bond::maybe<std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other> >,
|
||||
::bond::maybe<std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> > >,
|
||||
&Foo::m_wstr_2,
|
||||
&s_m_wstr_2_metadata
|
||||
> {} m_wstr_2;
|
||||
|
|
|
@ -93,8 +93,8 @@ namespace tests
|
|||
bool m_bool_1;
|
||||
bool m_bool_2;
|
||||
::bond::maybe<bool> m_bool_3;
|
||||
std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> m_str_1;
|
||||
::bond::maybe<std::basic_string<char, std::char_traits<char>, typename arena::rebind<char>::other> > m_str_2;
|
||||
std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > m_str_1;
|
||||
::bond::maybe<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<arena>::template rebind_alloc<char> > > m_str_2;
|
||||
int8_t m_int8_4;
|
||||
::bond::maybe<int8_t> m_int8_5;
|
||||
int16_t m_int16_4;
|
||||
|
@ -124,8 +124,8 @@ namespace tests
|
|||
::tests::EnumType1 m_enum_int32max;
|
||||
::tests::EnumType1 m_enum_uint32_min;
|
||||
::tests::EnumType1 m_enum_uint32_max;
|
||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other> m_wstr_1;
|
||||
::bond::maybe<std::basic_string<wchar_t, std::char_traits<wchar_t>, typename arena::rebind<wchar_t>::other> > m_wstr_2;
|
||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> > m_wstr_1;
|
||||
::bond::maybe<std::basic_string<wchar_t, std::char_traits<wchar_t>, typename std::allocator_traits<arena>::template rebind_alloc<wchar_t> > > m_wstr_2;
|
||||
|
||||
struct _bond_vc12_ctor_workaround_ {};
|
||||
template <int = 0> // Workaround to avoid compilation if not used
|
||||
|
|
Загрузка…
Ссылка в новой задаче