English 中文(简体)
自动取款机可确定上游运营商的位置,并适当限定用户的固定型号。
原标题:ADL can t locate stream operator with appropriate qualifiers for a user defined type

I m 编辑MicrosoftWindows 7的X64服务,同时使用

namespace my_ns
{
    typedef struct {} empty_t;
    typedef std::pair<size_t, std::shared_ptr<char>> string_t;
    typedef boost::variant<empty_t, double, long, string_t> variant_t;
    typedef std::map<unsigned short, variant_t> variant_map_t;
}

当我摆脱了这种扼杀——并用 st子取而代之:扼杀是我购买我的os子和团队nut子的日子。 但这并不是为什么我们在这里回想......

轮式变式支持下游运营商,只要该类型具有超负荷。 因此,我有:

namespace my_ns
{
    std::ostream &operator<<(std::ostream &, const empty_t &);
    std::ostream &operator<<(std::ostream &, const string_t &);
}

然而,我却怀着错误的信息:

error C2679: binary  <<  : no operator found which takes a right-hand operand of type  const T3  (or there is no acceptable conversion)

T3指的是扼杀。

产生错误的犯罪代码存在于以下情况下。 缩略语如下:

namespace my_ns
{
    void Widget::public_method(std::ostringstream &os) const
    {
        //variant_map_t Widget::the_map; // Private Widget member.

        // This here is a C++11 lambda in a standard loop algorithm, if you didn t recognize the syntax.
        std::for_each(the_map.begin(), the_map.end() [&os](variant_map_t::value_type value)
        {
            os << value.first <<  =  << value.second <<    ;
        });
    }
}

我曾试图取消右手限定语和参考书,想通过一份价值复制件将抵消限定词(也许不会因为一个共同点而如此精彩),而且我已尝试将声明从名称空间移至全球范围,希望反倾销法会以某种理由予以撤销(从概念上看,我获得反倾销法,但我仍然认为它没有什么黑魔力。

我不知道要做什么。 除了汇编者之外,这种ug的性质如何无法找到一个配备最合格的 r子的插入经营者? 怎样,当它在那里正确的时候? 该决议是什么?

问题回答

勿庸置疑,你在名称空间上添加一个字句,std:pairstd:ostream仍然是std的称号。 因此,汇编者将研究<代码><的操作者,而不是在您的名下。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签