Giter Club home page Giter Club logo

Comments (6)

nichamp avatar nichamp commented on May 18, 2024 1

I didnt notice this on the index.md, but I would think this should be added to WinRTTurboModule.props or targets to reduce a setup step for consumers

from react-native-winrt.

nichamp avatar nichamp commented on May 18, 2024

The same inconsistency applies to static_enum_data and others too.

from react-native-winrt.

dunhor avatar dunhor commented on May 18, 2024

MSVC is non-conforming by default. You have to compile with /Zc:externConstexpr.

More info here. The TL;DR is that constexpr is only useful/applies to definitions. The problem is that MSVC infers constexpr as internal linkage, even though that conflicts with the standard.

from react-native-winrt.

dunhor avatar dunhor commented on May 18, 2024

this should be added to WinRTTurboModule.props or targets

Seems reasonable

from react-native-winrt.

nichamp avatar nichamp commented on May 18, 2024

Actually, /Zc:externConstexpr isn't quite enough it seems. It resolves the constexpr const problem, but <ConformanceMode>true</ConformanceMode> is needed to workaround another issues when building vector_concat where the use of IVector and IVectorView are resolved against the namespaces of those names in base.h despite the local using namespace winrt::Windows::Foundation::Collections

Edit: Now that I have it building, I see the binary size drop from 3774 KiB -> 1729 KiB for the same config - great work on the optimizations!

from react-native-winrt.

dunhor avatar dunhor commented on May 18, 2024

Oh, interesting. I hadn't realized that we took a dependency on proper two phase name lookup, but it's been a while since I last tried without it. Should be simple enough to add to the props file as well.

And awesome to hear about the size reduction!

from react-native-winrt.

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.