stdany

    6热度

    4回答

    我在Xcode版本8.1中使用C++。我需要使用boost::any的功能,但我强烈反对将Boost的任何部分加入到我们的项目中(我们不要讨论它)。 我看到std::any是“合并到C++ 17”here。 我想在我的Xcode 8.1项目中使用它。我试过使用-std=c++1z作为项目的自定义标志,但我似乎无法找到它的标题。 如何在我的Xcode项目中使用std::any或std::experi

    19热度

    4回答

    例如boost::function移动几乎完全std::function,同样是boost::shared_ptr 但我找不到std::any? 是因为什么原因被重新命名或者没有被放入新标准?

    1热度

    1回答

    我想知道这是可能使符合性状像这样的擦除类型: template<class T> using read_t = std::conditional_t<true, decltype(std::declval<T>().Read(uint16_t{})), std::integral_constant<uint8_t (T::*)(uint16_t), &T::Read>>;