GithubHelp home page GithubHelp logo

Template-related errors about libosmium HOT 4 CLOSED

osmcode avatar osmcode commented on July 23, 2024
Template-related errors

from libosmium.

Comments (4)

joto avatar joto commented on July 23, 2024

Looks like the stackoverflow question you link to is the right one. To confirm can you change osmium/index/map/vector.hpp:112 to typedef TVector<element_type, std::allocator<element_type>> vector_type;?
This could make serdump.hpp compile but will blow up in other cases, so it is no fix.

from libosmium.

alex85k avatar alex85k commented on July 23, 2024

Replacing helped! No other errors are caused on Windows.
alex85k@dfca41a
(not sure about other OSes and usage cases)

from libosmium.

joto avatar joto commented on July 23, 2024

Can you try a different workaround instead of the one above?

In osmium/index/map/stl_vector.hpp line 49: add

            template <typename T>
            using MyVector = std::vector<T>;

and then use MyVector instead of std::vector:
using SparseMapMem = VectorBasedSparseMap<TId, TValue, MyVector>;

from libosmium.

alex85k avatar alex85k commented on July 23, 2024

Yes, that helps but errors in multimap remains:

D:\build_d\libosmium2\include\osmium/index/multimap/vector.hpp(55): error C2976: 'std::vector' : too few template arguments [D:\build_d\libosmium2\build-cmake\examples\osmium_serdump.vcxproj]

P.S. Applied analogous fix, it helped alex85k@00c2504

from libosmium.

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.