Comments (5)
from fruit.
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.
from fruit.
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.
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)
- build with vcpkg for ARM64:Android is getting errors HOT 3
- Trying to compile with NDK R22 fails HOT 11
- [Docs] Possible outdated documentation HOT 1
- Fruit does not build in Visual Studio Versions 2019, 2022 or 2022 Preview with CMake HOT 8
- what should I do to use a string as an annotion of some bind? HOT 3
- VS2022 Just My Code for Fruit Library fails using CMAKE HOT 6
- Create a fruit::Component by iterating over a list of fruit::Components HOT 7
- Can fruit be used with C language? HOT 2
- Handling lifetimes HOT 6
- Providing non-injected arguments to DI Objects HOT 14
- Build fails with Visual Studio 2022 with C++20 HOT 8
- Fruit with QT HOT 4
- Factories with reference types broken in fruit 3.7.0
- Generic binding? HOT 2
- Defining Factory Functions for Objects with Multiple Constructors HOT 11
- Replace boost HOT 1
- Creating Collections of DI Objects HOT 3
- [Suggestion] ExtractFirstError meta function SHOULD be non-error safe HOT 2
- Can no longer build examples in VS2022 Preview built by Visual Studio, VS CMake builds OK HOT 7
- Examples miss virtual dtor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fruit.