Category "templates"

C++ unpack variadic template arguments with the next function returns nothing [duplicate]

I'm trying to expand arguments to a variadic function. Code below works perfectly fine template<typename T> int printMy (const T& f)

Emulating Polymorphism without virtual pointers/overhead

Before reading I must emphasise I have demanding performance requirements (not premature optimization- processing millions of messages and need to design with p

Why does an optional argument in a template constructor for enable_if help the compiler to deduce the template parameter? [duplicate]

The minimal example is rather short: #include <iostream> #include <array> #include <type_traits> struct Foo{ //template

Covariant return type on Eigen Matrix for base class method

Suppose that I have two different solvers that both will be called at run time. I want to call solvers' api and get resulted Eigen matrix through the base class

couldn't find file 'owl.theme.default' with type 'text/css' error in rails 5.1.4

im getting the below error. Sprockets::FileNotFound at / couldn't find file 'owl.theme.default' with type 'text/css' Checked in these paths: /home/xyz/abc/pr

How to create a "factory function" for a templated class?

How would someone go about implementing a factory function for a templated class? Either my google searches aren't looking for the right thing, or I am misunde

How to send an email with variables using Mailjet API v3.1?

I just want to know why when I send variables using a template, the Mailjet API doesn't replace them, even the fakeFirstname doesn't show. I just see {{var:Firs

Is there a way to convert handlebars syntax to the golang template language?

Is there a safe way to easily convert standard handlebars templating syntax to the templating syntax used in golang(e.g. {{.Lookup "Question"}})? I have a Jenki

error: new initializer expression list treated as compound expression [-fpermissive]

I am trying to write a playlist method for songs in c++, however, I keep running into frequent errors. template <typename T> struct cir_list_node {

Ambiguous partial specializations and enable_if_t

This question is due to insane curiosity rather than an actual problem. Consider the following code: template<typename...> struct type_list {}; template&

Variadic template packed argument to std::vector

I'm new to templates and I don't really undestand why this doesn't work. I expected the vector to be constructed with those values. main.cpp template <typ

Is there a way to have a vue component whose template only contains the text of a property?

Is there a way to have a vue component which has a template area that only contains plain text? The problem I face with the current solution (using a div to wra

Visual Studio 2019 Project Export Template change Output Location

I am trying to do an export of my project template, and the output location is outdated and greyed out. I can't save to this folder. I have gone in to Tools/O

Passing and Returning a 2D array of unknown size in C++

I want to pass and return a 2D array of unknown size but I donot know how to do it. I know how to only return array of unknown size only (array of pointers). I

Integracion de HTML sin templateId

Good evening, I want to send my own html, not created in sendgrid by email, but I can't find a way to integrate it that is my code and this is the html templat

Why std::string relational operator comparison result is different for a template and a function?

In the following code, both the template and the function compare two strings and return which one is bigger. However, despite the same code (definition body),

Vue3 TypeError: template ref.value is null

how can I clean my console from the following error: TypeError: ref.value is null The error comes only with a resize event. Each time I resize the window, I re

Compiler discrepencies in deduction of template parameter of nested alias template

Consider the following code snippet where we we're trying to deduce the template parameter to the function foobar(): struct Bar { static constexpr auto size =

Overloading the pointer-to-member function operator. Attempting to resolving the const overloaded version isn't compiling

I'm currently doing practicing on the ->* operator with the intent to write a smart pointer. I've done the basics on how it works. For this example I want to

Docusign Template is no merging with APEX code

I send in the opportunity id into mySourceId into the routine and run through what should be the standard Docusign APEX API routines. We have a button that com