summaryrefslogtreecommitdiff
path: root/packages/fcl-stl/src/gutil.pp
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-04-10 19:20:48 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-04-10 19:20:48 +0000
commit160cc1e115eeb75638dce6effdd16b2bc810ddb4 (patch)
treeb791a95695a7cf674e61a6153139c6f9c6c491fa /packages/fcl-stl/src/gutil.pp
parent3843727e74b31bbf2a34e7e3b89ee422269f770e (diff)
parent413a6aa6469e6c297780217a27ca91363c637944 (diff)
downloadfpc-160cc1e115eeb75638dce6effdd16b2bc810ddb4.tar.gz
* rebase to trunk@17295avr
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/avr@17296 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fcl-stl/src/gutil.pp')
-rw-r--r--packages/fcl-stl/src/gutil.pp39
1 files changed, 39 insertions, 0 deletions
diff --git a/packages/fcl-stl/src/gutil.pp b/packages/fcl-stl/src/gutil.pp
new file mode 100644
index 0000000000..f653940f2b
--- /dev/null
+++ b/packages/fcl-stl/src/gutil.pp
@@ -0,0 +1,39 @@
+{
+ This file is part of the Free Pascal FCL library.
+ BSD parts (c) 2011 Vlado Boza
+
+ See the file COPYING.FPC, included in this distribution,
+ for details about the copyright.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY;without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+**********************************************************************}
+{$mode objfpc}
+
+unit gutil;
+
+interface
+
+type generic TLess<T>=class
+ class function c(a,b:T):boolean;inline;
+end;
+
+type generic TGreater<T>=class
+ class function c(a,b:T):boolean;inline;
+end;
+
+implementation
+
+class function TLess.c(a,b:T):boolean;inline;
+begin
+ c:=a<b;
+end;
+
+class function TGreater.c(a,b:T):boolean;inline;
+begin
+ c:=b<a;
+end;
+
+end.