Skip to main content

Questions tagged [sfinae]

Substitution failure is not an error (SFINAE) refers to a situation in C++ where an invalid substitution of template parameters is not in itself an error. This exploit can be used as a means to implement several template metaprogramming techniques.

2 votes
0 answers
155 views

I've learned that in C++17, std::invoke isn't constexpr. To make a constexpr version, I could copy the implementation provided here: https://en.cppreference.com/w/cpp/utility/functional/invoke , OR I ...
Steve Zhang's user avatar
5 votes
1 answer
642 views

I am an undergraduate CS student trying to implement simple unit test framework on C++ as a pet project. The framework has an assertion macro like ...
pazamelin's user avatar
6 votes
1 answer
296 views

Forward This is a continuation of my work in progress and the last iteration that I posted can be found here. I have designed a compact class template that uses SFINAE with constructor delegation to ...
Francis Cugler's user avatar
3 votes
1 answer
1k views

I'm trying to expand on the implementation of static_vector on the std::aligned_storage reference page, but would like to split it into two parts. First, an ...
rtek's user avatar
  • 53
5 votes
0 answers
170 views

The Goal Provide some wrappers to a C++11 template library's main entry point so that if the initial template parameter is not valid, the user is informed of exactly what is missing. In the real ...
svenevs's user avatar
  • 205
0 votes
1 answer
1k views

How can I write this function shorter? ...
21koizyd's user avatar
  • 217
10 votes
3 answers
1k views

Following on from my two previous posts. An alternative vector An Alternative Vector (Copy Assignment Operator) I have written a detailed blog about how to write a minimal vector like class. This set ...
Loki Astari's user avatar
  • 97.7k
9 votes
1 answer
5k views

While playing with the concurrency features in C++11 I noticed that there wasn't any support for continuations. I wanted to develop something similar to Tasks in The Parallel Patterns Library (PPL), ...
Eóin Ó'Flynn's user avatar

15 30 50 per page