相关疑难解决方法(0)

为什么没有必要的资格?

好吧,我会发布完整的程序,即使它有无关的东西,而且有问题的代码是死代码......

#include <iostream>
#include <fstream>

namespace detail {
    // Solution by Johannes Schaub alias litb
    // http://groups.google.com/group/comp.std.c++/browse_thread/thread/b567617bfccabcad
    template<int> struct D {};
    typedef char yes[1];
    typedef char no[2];

    template< class T, class U >
    yes& f( int, D< sizeof T(*(U*)0) >* = 0 );

    template< class T, class U >
    no& f( ... );

    template< class To, class From >
    struct IsExplicitlyConvertible
    {
        enum{ yes = (sizeof detail::f< To, From >(0) == sizeof( detail::yes ) ) };
    };

    bool const streamsSupportWindows …
Run Code Online (Sandbox Code Playgroud)

c++

13
推荐指数
2
解决办法
733
查看次数

标签 统计

c++ ×1