crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
mysqlcppconn.h
Go to the documentation of this file.
1 /*
2  *
3  * ---
4  *
5  * Copyright (C) 2020 Anselm Schmidt (ans[ät]ohai.su)
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version in addition to the terms of any
11  * licences already herein identified.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  *
21  * ---
22  *
23  * mysqlcppconn.h
24  *
25  * Overwrite of depreceated dynamic exception specification in MySQL Connector/C++ headers.
26  *
27  *
28  * Created on: Mar 23, 2019
29  * Author: ans
30  */
31 
32 #ifndef HELPER_PORTABILITY_MYSQLCPPCONN_H_
33 #define HELPER_PORTABILITY_MYSQLCPPCONN_H_
34 
35 #if __cplusplus >= 201703L
36  // necessary includes for header
37  #include <stdexcept>
38  #include <string>
39  #include <memory>
40 
41  // temporary removal of throw (ignoring warning by clang)
42  #ifdef __clang__
43  #pragma clang diagnostic push
44  #pragma clang diagnostic ignored "-Wkeyword-macro"
45  #endif
46 
47  #define throw(...)
48 
49  #ifdef __clang__
50  #pragma clang diagnostic pop
51  #endif
52 
53  #include <cppconn/exception.h>
54 
55  // reset
56  #undef throw
57 #endif
58 
59 
60 #endif /* HELPER_PORTABILITY_MYSQLCPPCONN_H_ */