Skip to content

Instantly share code, notes, and snippets.

@nicolasff
Created October 19, 2012 10:29
Show Gist options
  • Save nicolasff/3917404 to your computer and use it in GitHub Desktop.
Save nicolasff/3917404 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
string operator "" _rev(char const *p, size_t sz)
{
string rev(p, sz);
reverse(rev.begin(), rev.end());
return rev;
}
int main()
{
cout << "hello world"_rev << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment