Giter Club home page Giter Club logo

Comments (5)

poletti-marco avatar poletti-marco commented on August 22, 2024

from fruit.

kanstantsin-chernik avatar kanstantsin-chernik commented on August 22, 2024

Thank you for answer!
It is ok. We are on our way in moving source base to VS17.

I've looked at wiki/install and found that VS isn't supported.
Then I've opened issue issue 9 where I got that VS2017 is supported for sure. It means that wiki page is out dated. Actually, you've posted 2 messages, first that you are not going to add 2015 support and second that is was easier than expected with no version mentioned and closed issue. I just made a wrong assumption.
BTW, then I got through appveyor jobs and realized that 2015 isn't supported but already posted this issue :)

Thank you for nice solution. I am going to integrate it till the end of summer.

from fruit.

poletti-marco avatar poletti-marco commented on August 22, 2024

from fruit.

Paxxi avatar Paxxi commented on August 22, 2024

I'm still on VS2015 for the foreseeable future so I decided to look into the error. The following changes solves the compile issue

diff --git a/include/fruit/component.h b/include/fruit/component.h
index 6ca41e8..1081403 100644
--- a/include/fruit/component.h
+++ b/include/fruit/component.h
@@ -649,9 +649,9 @@ public:
    * other components.
    */
   template <typename OtherComponent, typename... Args>
-  PartialComponentWithReplacementInProgress<OtherComponent, Args...> replace(
+  auto replace(
       OtherComponent(*)(Args...),
-      Args... args);
+      Args... args) -> auto;

   ~PartialComponent();

diff --git a/include/fruit/impl/component.defn.h b/include/fruit/impl/component.defn.h
index b3303ef..ce55024 100644
--- a/include/fruit/impl/component.defn.h
+++ b/include/fruit/impl/component.defn.h
@@ -260,8 +260,8 @@ PartialComponent<Bindings...>::install(OtherComponent(*fun)(Args...), Args... ar

 template <typename... Bindings>
 template <typename OtherComponent, typename... ReplacedFunArgs>
-inline PartialComponent<Bindings...>::PartialComponentWithReplacementInProgress<OtherComponent, ReplacedFunArgs...>
-PartialComponent<Bindings...>::replace(OtherComponent(*fun)(ReplacedFunArgs...), ReplacedFunArgs... args) {
+inline auto
+PartialComponent<Bindings...>::replace(OtherComponent(*fun)(ReplacedFunArgs...), ReplacedFunArgs... args) -> auto {
   using IntCollector = int[];
   (void)(IntCollector{0, checkAcceptableComponentInstallArg<ReplacedFunArgs>()...});

from fruit.

poletti-marco avatar poletti-marco commented on August 22, 2024

I gave that patch a try, but it doesn't seem to be enough.
After playing around with it a bit more, with additional changes I was able to get Fruit to compile under MSVC 2015, but when running the tests I got some runtime crashes (that don't occur with other compilers nor with MSVC 2017). So I'm afraid I'm unable to support Fruit under MSVC 2015 for the time being.
If you're curious and/or you have time to look into it, I've committed my patch as 8d00ef4 (in a separate msvc-2015 branch, not in master).

from fruit.

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.