Giter VIP home page Giter VIP logo

Comments (5)

stephenberry avatar stephenberry commented on May 28, 2024 1

Yeah, integer keys need quoted.hpp because the keys must be quoted. And quoted acts as a special wrapper, so it exists in its own header.

This will likely be improved/refactored in the future, but for now using numeric keys needs quoted.hpp to be included. I usually recommend using glaze/json.hpp for general JSON usage, but it does include more headers than you need. I'm going to close this issue as I don't intend to make a specific change to address this complexity, but expect that it will be improved in the long term. C++20 modules support when added should also remove the need for partial includes.

from glaze.

stephenberry avatar stephenberry commented on May 28, 2024

This should totally work. It looks like MSVC introduced an error with their latest release. I added your test case here #939, which passes, and there were already similar tests that have been passing (previous versions of MSVC).

I can upgrade my version of MSVC to this latest version and test myself. Will get back to you soon.

from glaze.

stephenberry avatar stephenberry commented on May 28, 2024

So, I was able to successfully build and run the code using MSVC v17.9.6 (the latest). What header files are you including to use Glaze? It might be a header include issue. Or, it might be some other setup problem on your side.

from glaze.

helmesjo avatar helmesjo commented on May 28, 2024

Interesting... These are my includes (in this order):

#include <glaze/binary/read.hpp>
#include <glaze/binary/write.hpp>
#include <glaze/core/common.hpp>
#include <glaze/json/read.hpp>
#include <glaze/json/write.hpp>

Edit.
I use these includes to silence clang-tidy (and it's also what it generates). Sorting is from clang-format.

from glaze.

helmesjo avatar helmesjo commented on May 28, 2024

And indeed, including <glaze/glaze.hpp> works, so yep, something iffy with the includes.

from glaze.

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.