WarpX
QedTableCommons.H
Go to the documentation of this file.
1 #ifndef QED_TABLES_COMMONS_
2 #define QED_TABLES_COMMONS_
3 
4 #include <iostream>
5 #include <string>
6 
7 template <typename ContainerType, typename ElementType>
8 bool Contains (const ContainerType& container, const ElementType& el)
9 {
10  return container.find(el) != std::end(container);
11 }
12 
13 void AbortWithMessage(const std::string& msg)
14 {
15  std::cout << "### ABORT : " << msg << std::endl;
16  std::cout << "___________________________" << std::endl;
17  exit(1);
18 }
19 
21 {
22  std::cout << "___________________________" << std::endl;
23  exit(0);
24 }
25 
26 #endif //QED_TABLES_COMMONS_
void AbortWithMessage(const std::string &msg)
Definition: QedTableCommons.H:13
bool Contains(const ContainerType &container, const ElementType &el)
Definition: QedTableCommons.H:8
void SuccessExit()
Definition: QedTableCommons.H:20