folly/dynamic fix use of incomplete type in template definition
authorYiding Jia <yiding@fb.com>
Thu, 29 Nov 2012 22:34:41 +0000 (14:34 -0800)
committerJordan DeLong <jdelong@fb.com>
Sun, 16 Dec 2012 22:46:07 +0000 (14:46 -0800)
commit407e633f8072ed8317a9e4197d35ff33e19393ba
tree8fa654c82b79c11ece74c9f52f1dbf51c9eaf2ab
parent35a186fee211e2ce971b1549a2f7137ac359c809
folly/dynamic fix use of incomplete type in template definition

Summary:
the old code is ill-formed per spec (section 14.6.8):

> If a type used in a non-dependent name is incomplete at the point at which a
> template is defined but is complete at the point at which an instantiation is
> done, and if the completeness of that type affects whether or not the program
> is well-formed or affects the semantics of the program, the program is
> ill-formed; no diagnostic is required.

GCC is lax and allows this, clang gives an error.

Test Plan: compiles.

Reviewed By: delong.j@fb.com

FB internal diff: D643431
folly/dynamic-inl.h