comparison gen/cl_helpers.h @ 1175:cc1efa23030a

Enable inlining by default for -O3+.
author Frits van Bommel <fvbommel wxs.nl>
date Sun, 29 Mar 2009 19:38:59 +0200
parents a8cb25d478c4
children 3171f67ad006
comparison
equal deleted inserted replaced
1173:b0f9652f31de 1175:cc1efa23030a
60 60
61 void push_back(const std::string& str) { 61 void push_back(const std::string& str) {
62 push_back(str.c_str()); 62 push_back(str.c_str());
63 } 63 }
64 }; 64 };
65 65
66 /// Helper class to allow use of a parser<bool> with BoolOrDefault
67 class BoolOrDefaultAdapter {
68 cl::boolOrDefault value;
69 public:
70 operator cl::boolOrDefault() {
71 return value;
72 }
73
74 void operator=(cl::boolOrDefault val) {
75 value = val;
76 }
77
78 void operator=(bool val) {
79 *this = (val ? cl::BOU_TRUE : cl::BOU_FALSE);
80 }
81 };
66 } 82 }
67 83
68 #endif 84 #endif