Code Monkey home page Code Monkey logo

Comments (7)

qicosmos avatar qicosmos commented on August 22, 2024

我今天或者明天看一下这个问题。

from ormpp.

qicosmos avatar qicosmos commented on August 22, 2024

检查一下是不是iguana是不是最新的,另外再看一下你的编译器版本。
我用vs2017 15.7.1编译代码没有编译错误。

from ormpp.

Deelyn avatar Deelyn commented on August 22, 2024

iguana和ormpp都是最新的。看起来是编译器的问题,我的编译器是vs2017 15.8.7,换到稍早一些的15.7.4编译就没有错误。

在15.8.7,char[]似乎是在else分支发生错误,泛型我也不太懂
template<size_t I, typename T>
constexpr decltype(auto) get(T&& t)
{
using M = decltype(iguana_reflect_members(std::forward(t)));
using U = decltype(std::forward(t).(std::get(M::apply_impl())));
if constexpr(std::is_array_v) {
auto s = std::forward(t).
(std::get(M::apply_impl()));
std::array<char, sizeof(U)> arr;
memcpy(arr.data(), s, arr.size());
return arr;
}
else
return std::forward(t).*(std::get(M::apply_impl()));
}

from ormpp.

qicosmos avatar qicosmos commented on August 22, 2024

我后面升级到最新的编译器之后再看这个问题。

from ormpp.

qicosmos avatar qicosmos commented on August 22, 2024

你试试把T&& t的两个引号去掉看看编译过不

from ormpp.

Deelyn avatar Deelyn commented on August 22, 2024

你试试把T&& t的两个引号去掉看看编译过不 ~~~ 不行。

from ormpp.

Jacyking avatar Jacyking commented on August 22, 2024

请更新最新代码

from ormpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.