X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FDynamicConverter.h;h=c486d6712801c85b6dcf94852aaefb0652039049;hb=8893b8bcd26b41471e77c6882d77404c9a617176;hp=f29737a8e97ebfa4d6f39e52d83f272faff3204c;hpb=d1ddabb086a2a605b6fa4f95d7b3f72b7865d48b;p=folly.git diff --git a/folly/DynamicConverter.h b/folly/DynamicConverter.h index f29737a8..c486d671 100644 --- a/folly/DynamicConverter.h +++ b/folly/DynamicConverter.h @@ -1,5 +1,5 @@ /* - * Copyright 2017 Facebook, Inc. + * Copyright 2012-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,9 +30,11 @@ #include namespace folly { - template T convertTo(const dynamic&); - template dynamic toDynamic(const T&); -} +template +T convertTo(const dynamic&); +template +dynamic toDynamic(const T&); +} // namespace folly /** * convertTo returns a well-typed representation of the input dynamic. @@ -100,7 +102,7 @@ using is_associative = StrictConjunction, has_key_type>; namespace dynamicconverter_detail { -template +template struct Dereferencer { static inline void derefToCache( Optional* /* mem */, @@ -115,7 +117,7 @@ struct Dereferencer { } }; -template +template struct Dereferencer> { static inline void derefToCache( Optional>* mem, @@ -356,7 +358,7 @@ struct DynamicConstructor< }; // pair -template +template struct DynamicConstructor, void> { static dynamic construct(const std::pair& x) { dynamic d = dynamic::array; @@ -374,7 +376,7 @@ T convertTo(const dynamic& d) { return DynamicConverter::type>::convert(d); } -template +template dynamic toDynamic(const T& x) { return DynamicConstructor::type>::construct(x); }