From 41aba7156ae5954db53daf69cca2816a2c4d774d Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Thu, 3 Mar 2011 17:49:15 +0000 Subject: [PATCH] resurrecting triple.h from r1023 (after which it was removed) --- src/util/Makefile.am | 3 ++- src/util/triple.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 src/util/triple.h diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 837837cd6..4f853b9e3 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -32,7 +32,8 @@ libutil_la_SOURCES = \ stats.h \ stats.cpp \ dynamic_array.h \ - language.h + language.h \ + triple.h BUILT_SOURCES = \ rational.h \ diff --git a/src/util/triple.h b/src/util/triple.h new file mode 100644 index 000000000..9229a9eee --- /dev/null +++ b/src/util/triple.h @@ -0,0 +1,43 @@ +/********************* */ +/*! \file triple.h + ** \verbatim + ** Original author: mdeters + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 prototype. + ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys) + ** Courant Institute of Mathematical Sciences + ** New York University + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief Similar to std::pair<>, for triples + ** + ** Similar to std::pair<>, for triples. Once we move to c++0x, this + ** can be removed in favor of (standard-provided) N-ary tuples. + **/ + +#include "cvc4_private.h" + +#ifndef __CVC4__TRIPLE_H +#define __CVC4__TRIPLE_H + +namespace CVC4 { + +template +class triple { +public: + T1 first; + T2 second; + T3 third; +}; + +template +inline triple +make_triple(const T1& t1, const T2& t2, const T3& t3) { + return triple(t1, t2, t3); +} + +}/* CVC4 namespace */ + +#endif /* __CVC4__TRIPLE_H */ -- 2.30.2