Skip to content

Commit

Permalink
array copy support
Browse files Browse the repository at this point in the history
Signed-off-by: i-curve <[email protected]>
  • Loading branch information
i-curve committed Dec 18, 2023
1 parent 0399c28 commit fa6171f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ BB b[2] = {BB(1, "first", true), BB(2, "second", false)};
icurve::copy<AA, 3, BB, 2>(a, b);
```
c++ array
c++ style array
```c++
std::array<AA,3> a;
Expand Down
6 changes: 1 addition & 5 deletions include/icurve/copypp.hh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#pragma once
#if _MSC_VER && _MSVC_LANG < 201402L
#error "minimun c++ version is c++14."
#elif __cplusplus < 201402L
#if (_MSC_VER && _MSVC_LANG < 201402L) || __cplusplus < 201402L
#error "minimun c++ version is c++14."
#endif

Expand Down Expand Up @@ -78,8 +76,6 @@ void copy(std::span<D, L1> destination, std::span<S, L2> source) {
template <typename D, typename S>
void copy(std::vector<D> &destination, std::vector<S> &source) {
destination.clear();
if (source.empty())
return;
for (auto &item : source) {
D tmp;
copy(tmp, item);
Expand Down
4 changes: 1 addition & 3 deletions include/icurve/copypp_only.hh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#pragma once
#if _MSC_VER && _MSVC_LANG < 201402L
#error "minimun c++ version is c++14."
#elif __cplusplus < 201402L
#if (_MSC_VER && _MSVC_LANG < 201402L) || __cplusplus < 201402L
#error "minimun c++ version is c++14."
#endif

Expand Down

0 comments on commit fa6171f

Please sign in to comment.