Skip to content

Commit e794587

Browse files
authored
Fix date_time.hpp error and header generator warnings (#298)
1 parent b21cfd7 commit e794587

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

include/toml++/impl/date_time.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "forward_declarations.hpp"
88
#include "print_to_stream.hpp"
9+
#include "std_optional.hpp"
910
#include "header_start.hpp"
1011

1112
TOML_NAMESPACE_START

tools/generate_single_header.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def main():
117117
# blank lines between consecutive TOML_XXXXX_WARNINGS statements
118118
toml_h = re.sub('(TOML_[A-Z_]+?_WARNINGS;)\n[ \t\n]*\n(TOML_[A-Z_]+?_WARNINGS;)', r'\1\n\2', toml_h)
119119
# blank lines between consecutive #includes
120-
toml_h = re.sub('[#]\s*include\s*<(.+?)>\n[ \t\n]*\n[#]\s*include\s*<(.+?)>', r'#include <\1>\n#include <\2>', toml_h)
120+
toml_h = re.sub(r'[#]\s*include\s*<(.+?)>\n[ \t\n]*\n[#]\s*include\s*<(.+?)>', r'#include <\1>\n#include <\2>', toml_h)
121121
# blank lines following opening brackets or a comma
122122
toml_h = re.sub(r'([^@][({,])\n\n', r'\1\n', toml_h)
123123
# blank lines preceeding closing brackets
@@ -129,7 +129,7 @@ def main():
129129

130130
# change TOML_LIB_SINGLE_HEADER to 1
131131
toml_h = re.sub(
132-
'#\s*define\s+TOML_LIB_SINGLE_HEADER\s+[0-9]+',
132+
r'#\s*define\s+TOML_LIB_SINGLE_HEADER\s+[0-9]+',
133133
'#define TOML_LIB_SINGLE_HEADER 1',
134134
toml_h, 0, re.I
135135
)
@@ -242,7 +242,9 @@ def main():
242242
r'TOML_UNDEF_MACROS',
243243
r'TOMLPLUSPLUS_H',
244244
r'TOMLPLUSPLUS_HPP',
245-
r'TOML_SHARED_LIB'
245+
r'TOML_SHARED_LIB',
246+
r'TOML_DISABLE_CONDITIONAL_NOEXCEPT_LAMBDA',
247+
r'TOML_DISABLE_NOEXCEPT_NOEXCEPT'
246248
)
247249
set_defines = []
248250
for define, currently_set in defines.items():

0 commit comments

Comments
 (0)