00001 //*****************************************************************// 00002 // Albany 2.0: Copyright 2012 Sandia Corporation // 00003 // This Software is released under the BSD license detailed // 00004 // in the file "license.txt" in the top-level Albany directory // 00005 //*****************************************************************// 00006 #ifndef MOR_CONTAINERUTILS_HPP 00007 #define MOR_CONTAINERUTILS_HPP 00008 00009 #include <algorithm> 00010 00011 namespace MOR { 00012 00013 template <typename Container, typename T> 00014 bool contains(const Container &c, const T &t) 00015 { 00016 return std::find(c.begin(), c.end(), t) != c.end(); 00017 } 00018 00019 } // namespace MOR 00020 00021 #endif /* MOR_CONTAINERUTILS_HPP */