Skip to content

Instantly share code, notes, and snippets.

@niha
Created November 21, 2010 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niha/708541 to your computer and use it in GitHub Desktop.
Save niha/708541 to your computer and use it in GitHub Desktop.
適切な expression が書けないよの例
auto f(tag_type t) -> val {
switch (t) {
case A: return a();
case B: return b();
...
default: assert(false); /* return ??? */
}
assert(false);
/* return ??? */
}
enum class NoValue {};
auto for_unevaluate_context() -> NoValue {
/* return ??? */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment