detecting POD types

Andrej Mitrovic andrej.mitrovich at gmail.com
Sun May 20 07:18:14 PDT 2012


I don't think there is, but maybe you could use some template
constraints from std.traits, like isPointer:
if (!isPointer!T && !is(T == class))

There's probably other cases to consider, I'll leave others to fill in.

On 5/20/12, japplegame <japplegame at gmail.com> wrote:
> I write function template that should works only with POD types
> (i.e. base types, structures, enums etc.). Is there something
> like C++11 std::is_pod
> (http://en.cppreference.com/w/cpp/types/is_pod) template?
>


More information about the Digitalmars-d-learn mailing list