Skip to content

Commit

Permalink
partial revert: 5ab8c56
Browse files Browse the repository at this point in the history
What is most important change in this Pull Request is detail information about example tag.

ref:
- #487
- #481
  • Loading branch information
yumetodo committed Dec 9, 2017
1 parent f5a5c15 commit a6c520e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions editors_doc/specialized.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,32 @@ int main() {
}
```

## exampleタグ

includeとmain関数を含む**原則すべてのC/C++言語のコードブロック**には`example`タグをつけてください。
`example`タグが付いたコードブロックはその場で実際にコンパイル・実行することができるようになります。
たとえコンパイルエラーになる場合でも、利用者がその場でコードを書き換えて試行することを容易にするために原則つけてください。

````
```cpp example
#include <iostream>
int main()
{
std::cout << "arikitari_na_world" << std::endl;
}
```
````

つけない例としては次のような宣言が書いてあるのみのものが挙げられます。

```cpp
namespace std {
template <class T, class Allocator = allocator<T>>
class vector;
}
```
## プログラムの修飾
コードブロックの直後に特定の構文で記述することで、コードブロックの一部を修飾できます。
Expand Down

0 comments on commit a6c520e

Please sign in to comment.