From 2a4827990b1e083a0351f4f86de6889d0bb21719 Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Wed, 15 Aug 2018 12:16:20 -0700 Subject: Remove unused tuple classes (#2313) Since we are using C++11, we can replace the triple and quad classes with std::tuple. --- src/util/Makefile.am | 1 - src/util/ntuple.h | 98 ---------------------------------------------------- 2 files changed, 99 deletions(-) delete mode 100644 src/util/ntuple.h (limited to 'src/util') diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 04d0a5b02..baa3286ab 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -35,7 +35,6 @@ libutil_la_SOURCES = \ index.cpp \ index.h \ maybe.h \ - ntuple.h \ ostream_util.cpp \ ostream_util.h \ proof.h \ diff --git a/src/util/ntuple.h b/src/util/ntuple.h deleted file mode 100644 index 1df8c8e76..000000000 --- a/src/util/ntuple.h +++ /dev/null @@ -1,98 +0,0 @@ -/********************* */ -/*! \file ntuple.h - ** \verbatim - ** Top contributors (to current version): - ** Morgan Deters - ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2018 by the authors listed in the file AUTHORS - ** in the top-level source directory) and their institutional affiliations. - ** All rights reserved. See the file COPYING in the top-level source - ** directory for licensing information.\endverbatim - ** - ** \brief Similar to std::pair<>, for triples and quadruples - ** - ** Similar to std::pair<>, for triples and quadruples. Once we move to c++0x, this - ** can be removed in favor of (standard-provided) N-ary tuples. - **/ - -#include "cvc4_private.h" - -#ifndef __CVC4__NTUPLE_H -#define __CVC4__NTUPLE_H - -namespace CVC4 { - -template -class triple { -public: - T1 first; - T2 second; - T3 third; - triple() {} - triple(const T1& t1, const T2& t2, const T3& t3) : - first(t1), - second(t2), - third(t3) { - } -};/* class triple<> */ - -template -inline triple -make_triple(const T1& t1, const T2& t2, const T3& t3) { - return triple(t1, t2, t3); -}/* make_triple() */ - -template -class quad { -public: - T1 first; - T2 second; - T3 third; - T4 fourth; - quad() {} - quad(const T1& t1, const T2& t2, const T3& t3, const T4& t4) : - first(t1), - second(t2), - third(t3), - fourth(t4) { - } -};/* class quad<> */ - -template -bool operator==(const quad& x, - const quad& y) { - return (x.first==y.first && x.second==y.second && - x.third == y.third && x.fourth==y.fourth); -} - -template -bool operator<(const quad& x, - const quad& y) { - if(x.first< y.first) { - return true; - } - else if (x.first == y.first) { - if(x.second < y.second) { - return true; - } - else if(y.second == y.second) { - if(x.third < y.third) { - return true; - } - else if (x.fourth < y.fourth) { - return true; - } - } - } - return false; -} - -template -inline quad -make_quad(const T1& t1, const T2& t2, const T3& t3, const T4& t4) { - return quad(t1, t2, t3, t4); -}/* make_quad() */ - -}/* CVC4 namespace */ - -#endif /* __CVC4__NTUPLE_H */ -- cgit v1.2.3