Skip to content

Commit d943142

Browse files
author
Hana Dusíková
committed
disable literals in gcc9.1+
1 parent d73c537 commit d943142

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ More documentation on [pcre.org](https://www.pcre.org/current/doc/html/pcre2synt
5353

5454
#### Template UDL syntax
5555

56-
Compiler must support N3599 extension, as GNU extension in gcc (not in c++2a mode) and clang.
56+
Compiler must support N3599 extension, as GNU extension in gcc (not in GCC 9.1+) and clang.
5757

5858
```c++
5959
constexpr auto match(std::string_view sv) noexcept {
@@ -62,6 +62,8 @@ constexpr auto match(std::string_view sv) noexcept {
6262
}
6363
```
6464
65+
If you need N3599 extension in GCC 9.1+ you can't use -pedantic mode and define macro `CTRE_ENABLE_LITERALS`.
66+
6567
#### C++17 syntax
6668
6769
You can provide pattern as a `constexpr ctll::fixed_string` variable.

include/ctre/literals.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ namespace literals {
3333
#elif defined __GNUC__
3434
#if not(__GNUC__ == 9 || __GNUC__ == 10)
3535
#define CTRE_ENABLE_LITERALS
36-
#else
37-
#if !__cpp_nontype_template_parameter_class
38-
#define CTRE_ENABLE_LITERALS
39-
#endif
4036
#endif
4137
#endif
4238

single-header/ctre.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3636,10 +3636,6 @@ namespace literals {
36363636
#elif defined __GNUC__
36373637
#if not(__GNUC__ == 9 || __GNUC__ == 10)
36383638
#define CTRE_ENABLE_LITERALS
3639-
#else
3640-
#if !__cpp_nontype_template_parameter_class
3641-
#define CTRE_ENABLE_LITERALS
3642-
#endif
36433639
#endif
36443640
#endif
36453641

0 commit comments

Comments
 (0)