#ifndef VCZH_COLLECTIONS_OPERATIONCOPYFROM
#define VCZH_COLLECTIONS_OPERATIONCOPYFROM
#include "Interfaces.h"
namespace
{
namespace
{
namespace
{
using
namespace
randomaccess_internal
;
template
<
typename
,
typename
,
bool
,
bool
>
struct
{
};
template
<
typename
,
typename
>
struct
<
,
,
true
,
true
>
{
static
void
(
&
,
const
&
,
bool
)
{
=
<
>::
(
);
=(
?
<
>::
(
):
0
);
=
index
+
copyCount
;
<
>::
(
,
resizeCount
);
for
(
=
0
;
i
<
copyCount
;
i
++)
{
<
>::
(
,
index
+
i
,
<
>::
(
,
i
));
}
}
};
template
<
typename
,
typename
>
struct
<
,
,
false
,
true
>
{
static
void
(
&
,
const
&
,
bool
)
{
if
(!
)
{
.Clear();
}
=
<
>::
(
);
for
(
=
0
;
i
<
copyCount
;
i
++)
{
<
>::
(
,
<
>::
(
,
i
));
}
}
};
template
<
typename
,
typename
>
struct
<
,
,
true
,
false
>
{
static
void
(
&
,
const
&
,
bool
)
{
<
<
typename
::ElementType>>
;
=
0
;
enumerator
=
.CreateEnumerator();
while
(
enumerator
())
{
copyCount
++;
}
=(
?
<
>::
(
):
0
);
=
index
+
copyCount
;
<
>::
(
,
resizeCount
);
enumerator
=
.CreateEnumerator();
while
(
enumerator
())
{
<
>::
(
,
index
++,
enumerator
());
}
}
};
template
<
typename
,
typename
>
struct
<
,
,
false
,
false
>
{
static
void
(
&
,
const
&
,
bool
)
{
if
(!
)
{
.Clear();
}
<
<
typename
::ElementType>>
=
.CreateEnumerator();
while
(
enumerator
())
{
<
>::
(
,
enumerator
());
}
}
};
template
<
typename
>
struct
{
const
*
;
;
};
}
namespace
{
template
<
typename
>
struct
<
copyfrom_internal
::
<
>>
{
static
const
bool
=
true
;
static
const
bool
=
true
;
};
template
<
typename
>
struct
<
copyfrom_internal
::
<
>>
{
static
(
const
copyfrom_internal
::
<
>&
)
{
return
.
;
}
static
const
&
(
const
copyfrom_internal
::
<
>&
,
)
{
return
.
[
];
}
};
}
template
<
typename
,
typename
>
void
(
&
,
const
&
,
bool
=
false
)
{
copyfrom_internal
::
<
,
,
randomaccess_internal
::
<
>::
,
randomaccess_internal
::
<
>::
>::
(
,
,
);
}
template
<
typename
,
typename
>
void
(
&
,
const
*
,
,
bool
=
false
)
{
copyfrom_internal
::
<
>
= {
,
};
(
,
slice
,
);
}
template
<
typename
,
typename
>
void
(
&
,
const
*
,
const
*
,
bool
=
false
)
{
copyfrom_internal
::
<
>
= {
,
-
};
(
,
slice
,
);
}
}
}
#endif