Skip to content

Commit d32fe04

Browse files
author
Hana Dusíková
committed
preparation for the merge into main
1 parent 23368fa commit d32fe04

File tree

8 files changed

+23858
-9554
lines changed

8 files changed

+23858
-9554
lines changed

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ mtent12.txt: mtent12.zip
5959
unzip -o mtent12.zip
6060
touch mtent12.txt
6161

62-
single-header: single-header/ctre.hpp
62+
single-header: single-header/ctre.hpp single-header/ctre-unicode.hpp single-header/unicode-db.hpp
63+
64+
single-header/unicode-db.hpp: include/unicode-db/unicode-db.hpp
65+
cp $+ $@
6366

6467
single-header/ctre.hpp:
6568
python3 -m quom include/ctre.hpp ctre.hpp.tmp
@@ -68,6 +71,14 @@ single-header/ctre.hpp:
6871
echo "*/" >> single-header/ctre.hpp
6972
cat ctre.hpp.tmp >> single-header/ctre.hpp
7073
rm ctre.hpp.tmp
74+
75+
single-header/ctre-unicode.hpp:
76+
python3 -m quom include/ctre-unicode.hpp ctre-unicode.hpp.tmp
77+
echo "/*" > single-header/ctre-unicode.hpp
78+
cat LICENSE >> single-header/ctre-unicode.hpp
79+
echo "*/" >> single-header/ctre-unicode.hpp
80+
cat ctre-unicode.hpp.tmp >> single-header/ctre-unicode.hpp
81+
rm ctre-unicode.hpp.tmp
7182

7283
REPEAT:=10
7384

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ More documentation on [pcre.org](https://www.pcre.org/current/doc/html/pcre2synt
4444
* `std::string`-like object (`std::string_view` or your own string if it's providing `begin`/`end` functions with forward iterators)
4545
* pair of forward iterators
4646

47+
### Unicode support
48+
49+
To enable you need to include:
50+
* `<ctre-unicode.hpp>`
51+
* or `<ctre.hpp>` and `<unicode-db.hpp>`
52+
53+
Otherwise you will get missing symbols if you try to use the unicode support without enabling it.
54+
4755
## Supported compilers
4856

4957
* clang 6.0+ (template UDL, C++17 syntax)

include/ctre-unicode.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef CTRE_V2__CTRE_UNICODE__HPP
2+
#define CTRE_V2__CTRE_UNICODE__HPP
3+
4+
#include "ctre.hpp"
5+
#include "unicode-db/unicode-db.hpp"
6+
7+
#endif
Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ namespace uni
102102
#include <algorithm>
103103
#include <string_view>
104104

105-
#ifndef UNI_SINGLE_HEADER
106-
# pragma once
107-
# include "synopsys.h"
108-
#endif
109-
110105
namespace uni::detail {
111106

112107
template<class ForwardIt, class T, class Compare>
@@ -393,11 +388,6 @@ constexpr numeric_value::numeric_value(long long n, int16_t d) : _n(n), _d(d) {}
393388

394389
} // namespace uni
395390

396-
#ifndef UNI_SINGLE_HEADER
397-
# pragma once
398-
# include "base.h"
399-
#endif
400-
401391
namespace uni {
402392
enum class version : uint8_t {
403393
unassigned,
@@ -7447,10 +7437,6 @@ constexpr bool cp_is<property::xids>(char32_t c) {
74477437
}
74487438
} // namespace uni
74497439
#include <iterator>
7450-
#ifndef UNI_SINGLE_HEADER
7451-
# pragma once
7452-
# include "props.h"
7453-
#endif
74547440

74557441
namespace uni {
74567442

@@ -7732,10 +7718,7 @@ namespace std
77327718
using iterator_category = std::forward_iterator_tag;
77337719
};
77347720
}
7735-
#ifndef UNI_SINGLE_HEADER
7736-
# pragma once
7737-
# include "unicode.h"
7738-
#endif
7721+
77397722
namespace uni::detail {
77407723
enum class binary_prop {
77417724
ahex,
@@ -9663,9 +9646,6 @@ namespace tables {
96639646
string_with_idx{"zzzz", 243}};
96649647
}
96659648
} // namespace uni::detail
9666-
#ifndef UNI_SINGLE_HEADER
9667-
# pragma once
9668-
#endif
96699649

96709650
// More regex support for ctre
96719651

0 commit comments

Comments
 (0)