Add wrapper macros for "final" and "override"
authorTudor Bosman <tudorb@fb.com>
Mon, 16 Jul 2012 03:13:19 +0000 (20:13 -0700)
committerJordan DeLong <jdelong@fb.com>
Thu, 2 Aug 2012 08:52:32 +0000 (01:52 -0700)
commit3e0db1be8cd3051dae5b100021b00575e154f988
tree4dc2d5d1a5f9ceddcc9afbcb116ca9e867820660
parent73f06be3863eb65eab24fc40377df4fa099cb6e7
Add wrapper macros for "final" and "override"

Summary:
... which are supported in gcc 4.7, but not 4.6, and they enable useful
optimizations.  As long as we're planning to support both 4.6 and 4.7 in
our code base, we should write code using these macros.

Test Plan:
test added, compiled with both 4.6 and 4.7, verified the
assertion in the test comment by looking at dissassembly output in the
4.7 version

Reviewed By: delong.j@fb.com

FB internal diff: D520343
folly/Portability.h
folly/test/PortabilityTest.cpp [new file with mode: 0644]