Skip Navigation
Tool for instantiating a C++ template at runtime?
  • It sounds like what you are looking for is a form of an object request broker. Provide the name of a class as a string (or, if the set of desired objects is more constrained, an integer or enum or something similar) and then build an instance based on that key. Generally, all these objects typically inherit from some base class like Object so that the broker can return an Object* and the client can dynamic cast it down to the actual thing. I've used a pattern like this in the past that worked pretty well using macro magic to enable classes eligible to be instantiated through the broker (register the key and the class name with the broker). This was pre-C++03, so doubtless there are cleaner and more modern ways to implement such a thing these days.

  • Apple to stop selling its latest smartwatches after losing patent case to rival that says 'even the world’s most powerful company must abide by the law'
  • I wonder if they're a publicly traded company. Given the choice between this company trying to compete in the marketplace against Apple versus a guaranteed revenue stream from licensing and royalty fees (and likely a lucrative one at that), I'm pretty sure I know which the shareholders would pick. If this company ends up doing the former and going under, I can just smell the shareholder lawsuit that would ensue.

  • How do I get from Pearson to a hotel in Niagara?
  • I believe you can tell Niagara Airbus where to drop you off when you schedule your ride with them. My sister's used them a few times to get from her house in St. Catharines to Person or Buffalo and they picked her up at her place.

    Now I have their damn jingle stick in my head. Just 1990s Niagara things...

  • InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)LO
    lobsticle 🦞 @lemmy.world
    Posts 0
    Comments 49