Comments (4)
I've made the changes you suggest and everything compiles.
I used return m_value != 0;
I'm compile it as part of Unreal Engine, so I assume it uses /W4.
from ureact.
C4800 Implicit conversion from 'const size_t' to bool. Possible information loss
ureact\detail\take_drop_base.hpp 52
// checkable in boolean context
explicit operator bool() const
{
return m_value;
}
It is valid C++ code. Try to change it with either of the following variants:
return bool(m_value);
return static_cast<bool>(m_value);
return m_value != 0;
return !!m_value;
I need to know which of them don't trigger the error.
from ureact.
C4459 declaration of 'elements' hides global declaration
ureact\detail\slot_map.hpp 261
void shake( const size_type elements )
{
const auto total_size = [&]() { return elements + m_size; };
while( m_size > 0 && back_() == total_size() - 1 )
{
--m_size;
}
}
It seems that is is consequence of using namespace ureact
and including <ureact/adaptor/elements.hpp>
. Normally they are in different namespaces, so there is no any trace of shadowing. But once elements
included in the global scope, it's become a reason for warning.
Try to rename elements
arg to elements_amount
or something. It was not so correct name in the first place.
from ureact.
I need to check my MSVC warnings list. Ureact is tested with github actions with lots of enabled warnings. Which warnings flags do you use? I use /W3
. I heard that /W4
is kinda broken. It is full of false positives like you listed above. That's why /W3
is IDE default level, at least it is useful.
from ureact.
Related Issues (20)
- Rework observer/scoped_observer/observe/tap
- Consider adding `transaction::finish()` method HOT 1
- Consider to support iterators as an observer argument HOT 1
- Make sure transactions can't be started or finished when turn is in progress HOT 1
- `adjustment` adapter possible improvements
- Make `Adaptor` `AdaptorClosure` and nodes part of public interface
- Try to mesure and improve compile times HOT 8
- Get rid of `ureact_amalgamated.hpp` HOT 1
- Make normal library mode (not header-only)
- First code example in doc/introduction.adoc does not compile HOT 5
- Consider adding dereference operator for signals
- Consider `connection_owner` idea from `PG1003/observer`
- Research how to implement Qt style property bindings HOT 2
- Get rid of `issue_template.md` HOT 1
- Rework github actions
- `ureact::merge` can't compile in latest MSVC in c++20 mode HOT 3
- Consider making "event_source::operator<<" transaction wrapper HOT 1
- Research signal-slot library features
- Consider pitchfork project structure (aka PFL)
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 ureact.