[PATCH] D27679: Simplify format member detection in FormatVariadic

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 10:02:52 PST 2016


Can you give me an example of a trivial adapter with "broken" code and then
how to fix it?  Doesn't this work?

class FooAdapter : public FormatAdapter<int> {
public:
  explicit FooAdapter(int n) : FormatAdapter<int>(n) {}
};

On Wed, Dec 14, 2016 at 9:58 AM Pavel Labath via Phabricator <
reviews at reviews.llvm.org> wrote:

> labath updated this revision to Diff 81405.
> labath added a comment.
>
> Yes, I can. I can also add a static_assert test for that.
>
> As for the std::move issue, the only two options (which do not involve
> massive
> template magic) I can think of are:
>
> - live with it
> - have the base class not store the formatted member and leave it up for
> each derived class to decide how to store it.
>
>
> https://reviews.llvm.org/D27679
>
> Files:
>   docs/ProgrammersManual.rst
>   include/llvm/Support/FormatAdapters.h
>   include/llvm/Support/FormatCommon.h
>   include/llvm/Support/FormatProviders.h
>   include/llvm/Support/FormatVariadic.h
>   include/llvm/Support/FormatVariadicDetails.h
>   unittests/Support/FormatVariadicTest.cpp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161214/478eaf9e/attachment.html>


More information about the llvm-commits mailing list