use std::underlying_type to support enum classes
authorSoren Lassen <soren@fb.com>
Sun, 18 Nov 2012 22:43:07 +0000 (14:43 -0800)
committerJordan DeLong <jdelong@fb.com>
Sun, 16 Dec 2012 22:45:37 +0000 (14:45 -0800)
commit4f0bc5272f90bfcb7a18e6a1a4359a202a1b8cf9
treeca16eafd94d6864e933d50fe71436d12ece62e70
parentc462b06498397715b758ab1db07aafd8d0371842
use std::underlying_type to support enum classes

Summary:
Noticed these TODOs in Conv.h and decided to fix them.
Discovered that the underlying_type implementation also
covers enum classes, which didn't work with the pre-existing code.

Test Plan:
fbconfig -r folly --platform=gcc-4.7.1-glibc-2.14.1-fb
fbmake dbg _bin/folly/test/conv_test
_bin/folly/test/conv_test

--platform=gcc-4.6.2-glibc-2.13
fbmake dbg _bin/folly/test/conv_test
_bin/folly/test/conv_test

Reviewed By: tudorb@fb.com

FB internal diff: D634309
folly/Conv.h
folly/test/ConvTest.cpp