正规365体育投注

Questions tagged [templates]

正规365体育投注 The templates tag is used in multiple contexts: generic programming (especially C++), and data/document generation using template engines. When using this tag on implementation heavy questions - tag the code language the implementation is written in.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

Class template as a polymorphic base class?

Never worked with variant/optional before. I have the following minimal example: template <template T> class FileReader { public: virtual void read() = 0; // . . . } class BmpReader : ...
0
votes
3answers
39 views

Avoiding Template operator overload collisions for float and non float on the operator first argument

I have a situation where my template modulus operator does play nice between floats and integer-ish types. As I recall there is a way to make it select the more specific one over the broader scope one,...
0
votes
0answers
10 views

In Hugo can you have a taxonomy list template for individual taxonomy items?

I have a website I am building in Hugo using the Academic theme. Academic utilizes a word cloud to show popular tags. I like the default list template for most tags, but I have a specific tag type ...
0
votes
1answer
9 views

Where can I find a fitting website template for a news blog?

I am a professional translator/localizer and I don't have much knowledge of web design, so I turn to you for some advice in a current project I am developing. I am starting a website project (blog) ...
2
votes
3answers
58 views

Overload of a nested template function

I was thinking a lot what title to put on my question and failed anyway, so if you find a good one, please edit it. I am trying to write a print function for a vector or other container<T> and ...
0
votes
0answers
15 views

why template substitution fail specifying the namespace of the function to call?

Consider this code, which works as expected: serialization.h #include <QJsonObject> namespace ns{ QJsonValue serialize(int, Version); QJsonValue serialize(double, Version); class ...
0
votes
0answers
35 views

class template specialization not used [closed]

I'm trying to undertand the C++ rules for when generic or specialized versions of class templates are used. I sometimes find the results unintuitive. In the following code, the generic template is ...
1
vote
1answer
26 views

How can I reduce the function template specializations?

I'm trying to write a property validator to be used in UE4, using their reflection system. I first came up with this: class FDataValidator { public: FDataValidator( UObject & object, TArray&...
0
votes
0answers
5 views

GitHub: What is the difference between Template and Fork concepts and when to use?

I was wondering how GitHub templates differentiates from forks and why should I use them instead of forking a repository?
1
vote
0answers
12 views

Electron / node - Snipppets using require and readFile makes javascript fail

I use Electron which uses NodeJS. I started with a single very long HTML file. Now I want to split it up, similar to PHP require. I managed to do so with require and readFile. However after using ...
1
vote
0answers
10 views

Calling templated methods on objects from within a templated function [duplicate]

I have a templated class with one template parameter on it, and it has a method on it that is also templated, with different parameters. Here's a very simple example: #include <vector> ...
0
votes
1answer
24 views

Why does Flask look in two different directories for templates?

I'm working on my first Flask-based Python web app. It is working fine locally, but when I upload it, I have a problem with file paths. The Flask app is currently looking for two different pages, at ...
0
votes
1answer
46 views

C++ Function that takes an array, a predicate and a operator as arguments and apply the operator to array's element where predicate is satisfied

I'm trying to write a function as described in title. I made a template custom dynamic array called queue, and i need to create a function that checks for every element of this queue if a predicate ...
0
votes
2answers
52 views

Template function to return containers of unrelated types

I have several containers of unrelated types. I would like to write a templated function to process input values and insert them into the corresponding containers. This is my best try so far: #...
0
votes
0answers
20 views

Excel closes when trying to use graphic templates

Im having problems when trying to use excel templates for graphics. The problem is that excel stops working every time i try to select a saved template for a graph. This has happened with different ...

15 30 50 per page
1
2 3 4 5
3105