Regex: move boost headers to top of list to work around clang issue which requires workarounds present in config.hpp.

This commit is contained in:
jzmaddock
2017-09-21 17:15:51 +01:00
parent 09894a5e21
commit 289ce86488
26 changed files with 33 additions and 31 deletions

View File

@ -9,11 +9,11 @@
*
*/
#include <boost/regex.hpp>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <boost/regex.hpp>
#ifdef BOOST_MSVC
#pragma warning(disable:4512 4244)

View File

@ -16,8 +16,8 @@
* DESCRIPTION: Credit card number formatting code.
*/
#include <string>
#include <boost/regex.hpp>
#include <string>
bool validate_card_format(const std::string& s)
{

View File

@ -16,12 +16,12 @@
* DESCRIPTION: Search example using partial matches.
*/
#include <boost/regex.hpp>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <cstring>
#include <boost/regex.hpp>
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std{ using ::memmove; }

View File

@ -16,12 +16,12 @@
* DESCRIPTION: Search example using partial matches.
*/
#include <boost/regex.hpp>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <cstring>
#include <boost/regex.hpp>
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std{ using ::memmove; }

View File

@ -16,9 +16,9 @@
* DESCRIPTION: regex_match example using partial matches.
*/
#include <boost/regex.hpp>
#include <string>
#include <iostream>
#include <boost/regex.hpp>
boost::regex e("(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})");

View File

@ -16,9 +16,9 @@
* DESCRIPTION: regex_grep example 1: searches a cpp file for class definitions.
*/
#include <boost/regex.hpp>
#include <string>
#include <map>
#include <boost/regex.hpp>
// purpose:
// takes the contents of a file in the form of a string

View File

@ -17,6 +17,7 @@
* using a global callback function.
*/
#include <boost/regex.hpp>
#include <string>
#include <map>
#include <boost/regex.hpp>

View File

@ -17,9 +17,9 @@
* using a bound member function callback.
*/
#include <boost/regex.hpp>
#include <string>
#include <map>
#include <boost/regex.hpp>
#include <functional>
#include <boost/detail/workaround.hpp>

View File

@ -19,9 +19,9 @@
#ifdef __BORLANDC__
#include <boost/regex.hpp>
#include <string>
#include <map>
#include <boost/regex.hpp>
#include <functional>
// purpose:

View File

@ -17,11 +17,11 @@
* using global data.
*/
#include <boost/regex.hpp>
#include <string>
#include <map>
#include <fstream>
#include <iostream>
#include <boost/regex.hpp>
using namespace std;

View File

@ -16,9 +16,9 @@
* DESCRIPTION: ftp based regex_match example.
*/
#include <boost/regex.hpp>
#include <cstdlib>
#include <stdlib.h>
#include <boost/regex.hpp>
#include <string>
#include <iostream>

View File

@ -17,12 +17,12 @@
* converts a C++ file to syntax highlighted HTML.
*/
#include <boost/regex.hpp>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <iterator>
#include <boost/regex.hpp>
#include <fstream>
#include <iostream>

View File

@ -17,12 +17,12 @@
* converts a C++ file to syntax highlighted HTML.
*/
#include <boost/regex.hpp>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <iterator>
#include <boost/regex.hpp>
#include <fstream>
#include <iostream>

View File

@ -16,9 +16,9 @@
* DESCRIPTION: regex_search example: searches a cpp file for class definitions.
*/
#include <boost/regex.hpp>
#include <string>
#include <map>
#include <boost/regex.hpp>
// purpose:
// takes the contents of a file in the form of a string

View File

@ -17,8 +17,8 @@
*/
#include <list>
#include <boost/regex.hpp>
#include <list>
unsigned tokenise(std::list<std::string>& l, std::string& s)

View File

@ -17,11 +17,11 @@
*/
#include <boost/regex.hpp>
#include <list>
#include <fstream>
#include <iostream>
#include <iterator>
#include <boost/regex.hpp>
boost::regex e("<\\s*A\\s+[^>]*href\\s*=\\s*\"([^\"]*)\"",
boost::regex::normal | boost::regbase::icase);

View File

@ -17,10 +17,10 @@
*/
#include <boost/regex.hpp>
#include <fstream>
#include <iostream>
#include <iterator>
#include <boost/regex.hpp>
boost::regex e("<\\s*A\\s+[^>]*href\\s*=\\s*\"([^\"]*)\"",
boost::regex::normal | boost::regbase::icase);

View File

@ -13,6 +13,12 @@
#pragma warning(disable: 4996 4127)
#endif
#include <boost/config.hpp>
#include <boost/regex.hpp>
#include <boost/cregex.hpp>
#include <boost/timer.hpp>
#include <boost/smart_ptr.hpp>
#include <string>
#include <algorithm>
#include <deque>
@ -35,12 +41,6 @@ using std::streambuf;
using std::getline;
#endif
#include <boost/config.hpp>
#include <boost/regex.hpp>
#include <boost/cregex.hpp>
#include <boost/timer.hpp>
#include <boost/smart_ptr.hpp>
#if defined(_WIN32) && defined(BOOST_REGEX_USE_WIN32_LOCALE)
#include <windows.h>
#endif

View File

@ -19,6 +19,7 @@
#ifndef BOOST_REGEX_ICU_HPP
#define BOOST_REGEX_ICU_HPP
#include <boost/config.hpp>
#include <unicode/utypes.h>
#include <unicode/uchar.h>
#include <unicode/coll.h>

View File

@ -19,12 +19,12 @@
#ifndef BOOST_REGEX_OBJECT_CACHE_HPP
#define BOOST_REGEX_OBJECT_CACHE_HPP
#include <boost/config.hpp>
#include <boost/shared_ptr.hpp>
#include <map>
#include <list>
#include <stdexcept>
#include <string>
#include <boost/config.hpp>
#include <boost/shared_ptr.hpp>
#ifdef BOOST_HAS_THREADS
#include <boost/regex/pending/static_mutex.hpp>
#endif

View File

@ -19,7 +19,7 @@
#ifndef BOOST_REGEX_WORKAROUND_HPP
#define BOOST_REGEX_WORKAROUND_HPP
#include <boost/config.hpp>
#include <new>
#include <cstring>
#include <cstdlib>

View File

@ -20,11 +20,11 @@
#define UNICODE
#define _UNICODE
#include <boost/regex.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <boost/regex.h>
#ifndef BOOST_NO_WREGEX
#include <wchar.h>

View File

@ -16,10 +16,10 @@
* DESCRIPTION: Test for indefinite recursion and/or stack overrun.
*/
#include <string>
#include <boost/regex.hpp>
#include <boost/detail/lightweight_main.hpp>
#include "../test_macros.hpp"
#include <string>
#ifdef BOOST_INTEL
#pragma warning(disable:1418 981 983 383)

View File

@ -16,10 +16,10 @@
* DESCRIPTION: Test for indefinite recursion and/or stack overrun.
*/
#include <string>
#include <boost/regex.hpp>
#include <boost/detail/lightweight_main.hpp>
#include "../test_macros.hpp"
#include <string>
#ifdef BOOST_INTEL
#pragma warning(disable:1418 981 983 383)

View File

@ -16,11 +16,11 @@
* DESCRIPTION: test program for boost::static_mutex.
*/
#include <iostream>
#include <iomanip>
#include <boost/regex/pending/static_mutex.hpp>
#include <boost/thread/thread.hpp>
#include <boost/timer.hpp>
#include <iostream>
#include <iomanip>
//
// we cannot use the regular Boost.Test in here: it is not thread safe

View File

@ -17,13 +17,13 @@
* paste into regex source.
*/
#include <boost/config.hpp>
#include <map>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
#include <cctype>
#include <boost/config.hpp>
std::string g_char_type;
std::string g_data_type;