Commit a0d036e4 authored by Andrew Gallagher's avatar Andrew Gallagher Committed by Jordan DeLong

folly/dynamic: fix explicit specializations after instantiation

Summary:
clang complains that the explicit specializations in dynamic.cpp
come after references in dynamic-inl.h.

Test Plan:
- built dyamic.o with clang
- built folly normally and ran unittests

Reviewed By: delong.j@fb.com

FB internal diff: D691081
parent e1df3470
/*
* Copyright 2012 Facebook, Inc.
* Copyright 2013 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -691,6 +691,20 @@ template<class T> struct dynamic::TypeInfo {
static Type const type;
};
#define FB_DEC_TYPE(T) \
template<> char const dynamic::TypeInfo<T>::name[]; \
template<> dynamic::Type const dynamic::TypeInfo<T>::type
FB_DEC_TYPE(void*);
FB_DEC_TYPE(bool);
FB_DEC_TYPE(fbstring);
FB_DEC_TYPE(dynamic::Array);
FB_DEC_TYPE(double);
FB_DEC_TYPE(int64_t);
FB_DEC_TYPE(dynamic::ObjectImpl);
#undef FB_DEC_TYPE
template<class T>
T dynamic::asImpl() const {
switch (type()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment