Date: Tue, 4 Feb 2025 13:23:59 +0000
On Tue, Feb 4, 2025 at 12:23 PM Tiago Freire <tmiguelf_at_[hidden]> wrote:
>
> typename MyType;
I like the use of the keyword 'typename' instead of 'declare' for
this. So you can use it for standard library classes (and template
classes) as follows:
typename std::runtime_error;
extern bool IsFatal(std::runtime_error &);
constexpr bool all_are_fatal = false;
bool Process(std::runtime_error &arg)
{
return all_are_fatal || IsFatal(arg);
}
In the future, perhaps the use of the typename keyword could be
extended, perhaps even to specify the mangled name of the type:
typename SomeType "_Z8SomeType";
>
> typename MyType;
I like the use of the keyword 'typename' instead of 'declare' for
this. So you can use it for standard library classes (and template
classes) as follows:
typename std::runtime_error;
extern bool IsFatal(std::runtime_error &);
constexpr bool all_are_fatal = false;
bool Process(std::runtime_error &arg)
{
return all_are_fatal || IsFatal(arg);
}
In the future, perhaps the use of the typename keyword could be
extended, perhaps even to specify the mangled name of the type:
typename SomeType "_Z8SomeType";
Received on 2025-02-04 13:24:06