[Vala] Testing generic parameters for numeric type? For method implementation?
- From: Charles Hixson <charleshixsn earthlink net>
- To: vala-list gnome org
- Subject: [Vala] Testing generic parameters for numeric type? For method implementation?
- Date: Sat, 17 Sep 2011 16:15:36 -0700
How should one test a generic parameter to determine whether or not it
is of a numeric type?
Should I just go through a long If tree matching it's type name against
all of the predefined numeric types?
Is there some way to determine whether a generic parameter responds to
to_string()? At run time? (The compiler seems to be very unhappy with
attempts to use that unless you cast the parameter to an appropriate type.)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]