template-aliases Questions
2
Solved
We have observed a strange behaviour in the compilation of the follwing source code:
template<template<class> class TT> struct X { };
template<class> struct Y { };
template<cl...
Nauseating asked 11/10, 2013 at 9:4
2
Solved
Can I use template aliases as template template parameters?
template <template <typename...> class> struct foo {};
template <typename T> using simple_ptr = std::unique_ptr<T&...
Tenner asked 6/9, 2011 at 12:0
3
Solved
I am writing some TMP-heavy code for g++ (version 4.8.1_1, Macports) and clang++ (version 3.3, Macports). While g++ rejects the following code listing with UNBRIDLED FURY, clang++ compiles it with ...
Venue asked 17/7, 2013 at 12:32
1
Solved
Info
I am trying to use a template alias to improve the readabilty of my code. Ideally I would like to the alias to have a default argument such that if I leave out the template it uses the defaul...
Neo asked 2/7, 2013 at 10:19
1
Solved
Is this another case, where whitespace matters in C++, or is it a compiler bug? Is the following code syntactically correct?
#include <type_traits>
template <bool cond>
using EnableIf...
Centrifugal asked 19/12, 2012 at 11:29
1
Solved
In the case of a substitution failure involving a template alias (e.g. a template alias on a missing member typename, as in the code snippet below), should an error be triggered ?
Clang and gcc s...
Chintzy asked 5/12, 2012 at 16:46
1
Solved
Let's say I have these template aliases:
enum class enabler {};
template <typename T>
using EnableIf = typename std::enable_if<T::value, enabler>::type;
template <typename T>
us...
Ere asked 16/4, 2012 at 19:41
3
Solved
Here's a simple example:
class bar {};
template <typename>
class foo {};
template <>
using foo<int> = bar;
Is this allowed?
Flyboat asked 18/10, 2011 at 0:38
3
Solved
In C++03, template parameter deduction does not occur in some contexts. For example:
template <typename T> struct B {};
template <typename T>
struct A
{
typedef B<T> type;
};
...
Myoglobin asked 8/1, 2012 at 3:39
© 2022 - 2024 — McMap. All rights reserved.