Skip to content

Commit f1add1c

Browse files
committed
fix: 1d0cf2b によるプリプロセッサディレクティブ誤爆の修正
貢献ポイント備考: これは機械的な置換の後に目視確認で該当するものだけ拾っ たものです。 #1470 (comment)
1 parent 635bc5a commit f1add1c

File tree

159 files changed

+222
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+222
-222
lines changed

lang/cpp11/pragma_operator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ _Pragma (文字列リテラル)
3939
#include <iostream>
4040

4141
// OpenMPの言語拡張を使用して、for文を並列実行する
42-
# define OMP_PARALLEL_FOR _Pragma("omp parallel for")
42+
#define OMP_PARALLEL_FOR _Pragma("omp parallel for")
4343

4444
// 以下のように、Pragmaディレクティブでは書けない
4545
//#define OMP_PARALLEL_FOR #pragma omp parallel for

lang/cpp11/variadic_macros.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ C99互換として、可変引数マクロ(variadic macros)が導入された。
2121
可変引数マクロは、以下の構文を持つ:
2222

2323
```
24-
# define identifier ( ... ) replacement-list new-line
25-
# define identifier ( identifier-list , ... ) replacement-list new-line
24+
#define identifier ( ... ) replacement-list new-line
25+
#define identifier ( identifier-list , ... ) replacement-list new-line
2626
```
2727

2828
1行目は、パラメータ全てを可変個受け取る場合。2行目は、先頭のいくつかのパラメータを名前付きで受け取り、それ以外に可変個のパラメータを受け取る場合。
@@ -43,11 +43,11 @@ C99互換として、可変引数マクロ(variadic macros)が導入された。
4343
// 可変個のパラメータを受け取り、std::printf()関数の引数として転送する
4444
// 第1パラメータは必須。
4545
// 第1パラメータのうしろにカンマがあるので、第2パラメータも必須。
46-
# define DEBUG_LOG(fmt, ...) std::printf(fmt, __VA_ARGS__)
46+
#define DEBUG_LOG(fmt, ...) std::printf(fmt, __VA_ARGS__)
4747

4848
// 受け取ったパラメータを展開する
4949
// 0個以上の、任意の個数のパラメータを受け取れる
50-
# define FORWARD_ARGS(...) __VA_ARGS__
50+
#define FORWARD_ARGS(...) __VA_ARGS__
5151

5252
void f1(int a, int b, int c)
5353
{

reference/algorithm/equal.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ bool equal(InputIterator1 first1, InputIterator1 last1,
166166
return true;
167167
}
168168

169-
# if __cplusplus >= 201402L
169+
#if __cplusplus >= 201402L
170170

171171
template<class RandomAccessIterator1, class RandomAccessIterator2, class BinaryPredicate>
172172
inline bool equal_impl(RandomAccessIterator1 first1, RandomAccessIterator1 last1,
@@ -202,7 +202,7 @@ inline bool equal(InputIterator1 first1, InputIterator1 last1,
202202
return std::equal(first1, last1, first2, last2, equal_to<>());
203203
}
204204

205-
# endif
205+
#endif
206206
```
207207
* equal_to[link ../functional/equal_to.md]
208208

reference/algorithm/fill_n.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,17 @@ int main() {
146146
## 実装例
147147
```cpp
148148
template <class OutputIterator, class Size, class T>
149-
# if __cplusplus >= 201103L
149+
#if __cplusplus >= 201103L
150150
OutputIterator
151-
# else
151+
#else
152152
void
153-
# endif
153+
#endif
154154
fill_n(OutputIterator first, Size n, const T& value) {
155155
while (n-- > 0)
156156
*first++ = value;
157-
# if __cplusplus >= 201103L
157+
#if __cplusplus >= 201103L
158158
return first;
159-
# endif
159+
#endif
160160
}
161161
```
162162

reference/algorithm/generate_n.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ int main() {
8585
## 実装例
8686
```cpp
8787
template <class OutputIterator, class Size, class Generator>
88-
# if __cplusplus >= 201103L
88+
#if __cplusplus >= 201103L
8989
OutputIterator
90-
# else
90+
#else
9191
void
92-
# endif
92+
#endif
9393
generate_n(OutputIterator first, Size n, Generator gen) {
9494
while (n-- > 0)
9595
*first++ = gen();
96-
# if __cplusplus >= 201103L
96+
#if __cplusplus >= 201103L
9797
return first;
98-
# endif
98+
#endif
9999
}
100100
```
101101

reference/algorithm/is_permutation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ bool is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,
144144
return true;
145145
}
146146

147-
# if __cplusplus >= 201402L
147+
#if __cplusplus >= 201402L
148148

149149
template <class RandomAccessIterator1, class RandomAccessIterator2, class BinaryPredicate>
150150
bool is_permutation_impl(RandomAccessIterator1 first1, RandomAccessIterator1 last1,
@@ -198,7 +198,7 @@ bool is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,
198198
typename std::iterator_traits<ForwardIterator2>::iterator_category());
199199
}
200200

201-
# endif
201+
#endif
202202
```
203203
* std::mismatch[link mismatch.md]
204204
* std::count[link count.md]

reference/atomic/atomic_flag_init.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* cpp20deprecated[meta cpp]
66

77
```cpp
8-
# define ATOMIC_FLAG_INIT see below
8+
#define ATOMIC_FLAG_INIT see below
99
```
1010
* see below[italic]
1111

reference/atomic/atomic_var_init.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* cpp20deprecated[meta cpp]
66

77
```cpp
8-
# define ATOMIC_VAR_INIT(value) see below
8+
#define ATOMIC_VAR_INIT(value) see below
99
```
1010
* see below[italic]
1111
@@ -63,7 +63,7 @@ int main()
6363
6464
## 実装例
6565
```cpp
66-
# define ATOMIC_VAR_INIT(value) { value }
66+
#define ATOMIC_VAR_INIT(value) { value }
6767
```
6868

6969
## 参照

reference/atomic/lock_free_property.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
* cpp11[meta cpp]
55

66
```cpp
7-
# define ATOMIC_BOOL_LOCK_FREE unspecified // (1)
8-
# define ATOMIC_CHAR_LOCK_FREE unspecified // (2)
9-
# define ATOMIC_CHAR8_T_LOCK_FREE unspecified // (3) C++20から
10-
# define ATOMIC_CHAR16_T_LOCK_FREE unspecified // (4)
11-
# define ATOMIC_CHAR32_T_LOCK_FREE unspecified // (5)
12-
# define ATOMIC_WCHAR_T_LOCK_FREE unspecified // (6)
13-
# define ATOMIC_SHORT_LOCK_FREE unspecified // (7)
14-
# define ATOMIC_INT_LOCK_FREE unspecified // (8)
15-
# define ATOMIC_LONG_LOCK_FREE unspecified // (9)
16-
# define ATOMIC_LLONG_LOCK_FREE unspecified // (10)
17-
# define ATOMIC_POINTER_LOCK_FREE unspecified // (11)
7+
#define ATOMIC_BOOL_LOCK_FREE unspecified // (1)
8+
#define ATOMIC_CHAR_LOCK_FREE unspecified // (2)
9+
#define ATOMIC_CHAR8_T_LOCK_FREE unspecified // (3) C++20から
10+
#define ATOMIC_CHAR16_T_LOCK_FREE unspecified // (4)
11+
#define ATOMIC_CHAR32_T_LOCK_FREE unspecified // (5)
12+
#define ATOMIC_WCHAR_T_LOCK_FREE unspecified // (6)
13+
#define ATOMIC_SHORT_LOCK_FREE unspecified // (7)
14+
#define ATOMIC_INT_LOCK_FREE unspecified // (8)
15+
#define ATOMIC_LONG_LOCK_FREE unspecified // (9)
16+
#define ATOMIC_LLONG_LOCK_FREE unspecified // (10)
17+
#define ATOMIC_POINTER_LOCK_FREE unspecified // (11)
1818
```
1919
* unspecified[italic]
2020

reference/cassert/assert.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
* macro[meta id-type]
44

55
```cpp
6-
# if !defined(NDEBUG)
6+
#if !defined(NDEBUG)
77
#define assert(expr) implementation-defined // (1) C++03
88
#define assert(...) implementation-defined // (1) C++26
9-
# else
9+
#else
1010
#define assert(ignore) ((void)0) // (2) C++03
1111
#define assert(...) ((void)0) // (2) C++26
12-
# endif
12+
#endif
1313
```
1414

1515
## 概要

0 commit comments

Comments
 (0)