|
Last change
on this file since 47 was
29,
checked in by landauf, 17 years ago
|
|
updated boost from 1_33_1 to 1_34_1
|
|
File size:
796 bytes
|
| Line | |
|---|
| 1 | /* Copyright Bruno da Silva de Oliveira 2003. Use, modification and |
|---|
| 2 | distribution is subject to the Boost Software License, Version 1.0. |
|---|
| 3 | (See accompanying file LICENSE_1_0.txt or copy at |
|---|
| 4 | http:#www.boost.org/LICENSE_1_0.txt) |
|---|
| 5 | */ |
|---|
| 6 | #ifndef HEADER_TEST_H |
|---|
| 7 | #define HEADER_TEST_H |
|---|
| 8 | |
|---|
| 9 | #include <map> |
|---|
| 10 | #include <string> |
|---|
| 11 | |
|---|
| 12 | namespace header_test { |
|---|
| 13 | |
|---|
| 14 | enum choice { red, blue }; |
|---|
| 15 | |
|---|
| 16 | inline std::string choice_str(choice c) |
|---|
| 17 | { |
|---|
| 18 | std::map<choice, std::string> choice_map; |
|---|
| 19 | choice_map[red] = "red"; |
|---|
| 20 | choice_map[blue] = "blue"; |
|---|
| 21 | return choice_map[c]; |
|---|
| 22 | } |
|---|
| 23 | |
|---|
| 24 | struct C |
|---|
| 25 | { |
|---|
| 26 | choice c; |
|---|
| 27 | |
|---|
| 28 | std::string get() |
|---|
| 29 | { |
|---|
| 30 | return choice_str(c); |
|---|
| 31 | } |
|---|
| 32 | }; |
|---|
| 33 | |
|---|
| 34 | // test the exclusion of the following |
|---|
| 35 | |
|---|
| 36 | struct ForwardDeclared; // should be excluded automatically |
|---|
| 37 | struct A {}; |
|---|
| 38 | void foo(); |
|---|
| 39 | enum bar { value }; |
|---|
| 40 | |
|---|
| 41 | } |
|---|
| 42 | |
|---|
| 43 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.