Color::Proxy Color::operator[](const style::palette &paletteOverride) const { auto index = main_palette::indexOfColor(*this); return Proxy((index >= 0) ? paletteOverride.colorAtIndex(index) : (*this)); }
RInside::Proxy RInside::parseEvalNT(const std::string & line) { SEXP ans; parseEval(line, ans); return Proxy( ans ); }
Proxy operator [] (uint i) { return Proxy( container, i ); }
List::Proxy List::operator[] ( size_type i ) { return (Proxy(*this, i)); }
Proxy operator[](const std::size_t index) { return Proxy(array_of_arrays[index]); }
void DiscardProxy() { Proxy(Ip::Endpoint()); }
int main() { bool& ref = Proxy(); }
Object::Proxy Object::operator[] (Json::StaticString const& key) { return Proxy (*this, std::string (key)); }
void PhysicsWorld::QueryRegion(const Math::Vector3 &minPoint, const Math::Vector3 &maxPoint, RegionQueryResult &result) { return mBroadphase->QueryRegion(Proxy(minPoint, maxPoint), result); }
Grid::Proxy Grid::operator[](int index) { assert (index >= 0 && index < gridSize); return Proxy(dynamicGrid[index]); }
Object::Proxy Object::operator[] (std::string const& key) { return Proxy (*this, key); }
UserManagementServer::UserManagementServer(void) { Proxy("UserAce"); }
PropertyStream::Proxy PropertyStream::Map::operator[] (std::string const& key) { return Proxy (*this, key); }
map::Proxy map::operator[](int key) { return Proxy(*this, key); }
const map::Proxy map::operator[](int key) const { return Proxy(const_cast<map &>(*this), key); }
#define X(op, bits) bits, static unsigned char bits[] = { ENUMBINDING }; #undef X /* * Example 4 * * in case the name X has already been taken somewhere */ #define Proxy(apply) \ apply(foo) \ apply(bar) #define apply(a) K##a, enum { Proxy(apply) }; #undef apply #define apply(a) #a, static char *str_vals[] = { Proxy(apply) }; #undef apply int main() { printf("Value of key 2 is: %s\n", vals[KEY2]); printf("String name of dog is: \"%s\"\n", animal_names[KDog]); return 0; }