Skip to content

Commit 499225d

Browse files
committed
Fixes #255 ("Typos in Boost 1.87 documentation")
1 parent 3a0247a commit 499225d

File tree

7 files changed

+13
-6
lines changed

7 files changed

+13
-6
lines changed

doc/interprocess.qbk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
[def BOOST_INTERPROCESS_CATCH_END]
2626

2727
[def test::get_process_id_name() "MyName"]
28-
[def argv[2] "MyName"]
28+
[def test::get_argv_2(argv) "MyName"]
2929

3030

3131

example/doc_ipc_message.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int main (int argc, char *argv[])
6060
}
6161
else{
6262
//Open managed segment
63-
managed_shared_memory segment(open_only, argv[2]);
63+
managed_shared_memory segment(open_only, test::get_argv_2(argv));
6464

6565
//An handle from the base address can identify any byte of the shared
6666
//memory segment even if it is mapped in different base addresses

example/doc_named_alloc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ int main(int argc, char *argv[])
8282
}
8383
else{
8484
//Open managed shared memory
85-
managed_shared_memory segment(open_only, argv[2]);
85+
managed_shared_memory segment(open_only, test::get_argv_2(argv));
8686

8787
std::pair<MyType*, managed_shared_memory::size_type> res;
8888

example/doc_shared_memory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
5555
}
5656
else{
5757
//Open already created shared memory object.
58-
shared_memory_object shm (open_only, argv[2], read_only);
58+
shared_memory_object shm (open_only, test::get_argv_2(argv), read_only);
5959

6060
//Map the whole shared memory in this process
6161
mapped_region region(shm, read_only);

example/doc_spawn_vector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
6969
}
7070
else{ //Child process
7171
//Open the managed segment
72-
managed_shared_memory segment(open_only, argv[2]);
72+
managed_shared_memory segment(open_only, test::get_argv_2(argv));
7373

7474
//Find the vector using the c-string name
7575
MyVector *myvector = segment.find<MyVector>("MyVector").first;

example/doc_windows_shared_memory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
4747
}
4848
else{
4949
//Open already created shared memory object.
50-
windows_shared_memory shm (open_only, argv[2], read_only);
50+
windows_shared_memory shm (open_only, test::get_argv_2(argv), read_only);
5151

5252
//Map the whole shared memory in this process
5353
mapped_region region(shm, read_only);

test/get_process_id_name.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ inline std::wstring get_wfilename()
129129

130130
#endif
131131

132+
namespace test {
133+
134+
inline const char *get_argv_2(char *argv[])
135+
{ return argv[2]; }
136+
137+
} //namespace test {
138+
132139
} //namespace interprocess{
133140
} //namespace boost{
134141

0 commit comments

Comments
 (0)