Category "templates"

Get name of type behind type alias in function template

I'm working with Visual Studio 2013. When I need to know what types the compiler deduced for my template parameters, I usually trigger a compiler error like thi

generic decorators for callable objects with conditional return

I want to write decorator functions for callable objects. This is what I have now: #include <utility> template <typename DecoratedT, typename Callable

Can we use a webservice with Wordpress?

I change the details with the new information. Here is the situation: Our customers have Wordpress sites, they can customize it as they wish with the theme of t

How to pass template variadic arguments by reference in C++?

I want to get repeated inputs, therefore I made the function to get inputs with variety of types. template <typename InputType> void get_inputs(const std:

What problem do C++20 concepts really solve? [duplicate]

I'm trying to understand what problems C++20 concepts are solving and how exactly they are helpful to the end user. I understand that it helps

How template deduce const pointer type?

I've tried following codes in cppinsights: #include <iostream> #include <string> #include <type_traits> #include <vector> template<t

TemplateDoesNotExist at /home/

I'm following a video tutorial but Im getting an error. The only differance is that author uses Subline Text, while i use VSCode what is causing the error? ente

Member specialization does not match any template declaration

The code below compiles except for the lines template <> std::map<std::string, std::function<Goo*(Foo*)>>& Factory::getMap<Goo, Foo*>

How to extends abstract class from template in TypeScript?

I have an architecture like that and I want to extends my TemplateService with a template but actually I have an error on it. Is there a way to extends an abstr

How do I export templated classes from a dll without explicit specification?

I have a dll that contains a templated class. Is there a way to export it without explicit specification?

How to get the value of a template class?

I'm trying to get the value of a template class. To get the value of a class, I can easily do like: int get_value() { return *this; } But I want to create

if itemcontainerstyle is inside DataTemplate and a call the the main window is used an System.NullReferenceExc on start-up but works fine if ignored

when i try to call a event from the main wind if a control is in a template in itemcontainerstyle when the run a System.NullReferenceException: 'Object referenc

Sendgrid handlebar template array length

I'm trying to fetch length of an array but it seems length only exists for conditionals. Data: { "array": ["a", "b", "c"] } in sendgrid template: {{array.l

Question about the declaration about the aliasing constructor for `std::shared_ptr`

I think the 8th constructor of the std::shared_ptr<T> should be decalared as template< class T, class Y > shared_ptr<T>( const shared_ptr<Y

Create jinja template from dictionary in ansible

how can I access stdout and item values in a dictionary? My inventory file: all: hosts: server1: dict: custom_mountpoints: - /srv/

Is there any way to control optimization of a template function in visual studio c++ 2017

I tried using #pragma optimize("", off) to selectively disable optimizations for the a() function. This does not work. Is there any way to control optimization

How to include images in xhtml2pdf generated pdf files?

I am running a streamlit app which generates reports containing images and dataframes. I have used jinja2 to generate the html file from a template. Then, I wou

Template of multiple abstract classes

There are many questions about template specialization with abstract classes, still I couldn't find something that helped me solve my problem. First of all, let

Returning a struct pointer from class method

EDIT: Changed example code to code from my project that doesn't work. I'm writing code in C++, learning templates and got stuck with some problem. There's a cla

Template partial ordering - why does partial deduction succeed here

Consider the following simple (to the extent that template questions ever are) example: #include <iostream> template <typename T> struct identity;