AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-7325599

Fedor's questions

Martin Hope
Fedor
Asked: 2025-04-27 05:46:05 +0800 CST

带有(const T&&)参数的移动构造函数可以默认吗?

  • 9

我看到一个类似的问题Default move constructive taking a const parameter,这个问题已经有 8 年了,答案是 No。

但同时,稍微修改一下程序,在类定义之后默认使用构造函数:

struct A {
    A(const A&&);
};
A::A(const A&&) = default;

已被EDG 6.7接受,并于近期发布了GCC 15.1。在线演示:https://gcc.godbolt.org/z/E4qT3sTEq

甚至更复杂的例子似乎也可以在这两个编译器上正常工作:

struct A {
    int i;
    constexpr A(int v) : i(v) {}
    constexpr A(const A&&);
};

constexpr int f() {
    A a(1);
    A b = static_cast<const A&&>( a );
    return b.i;
}

constexpr A::A(const A&&) = default;
static_assert( f() == 1 );

但 MSVC 仍然不喜欢它:

error C2610: 'A::A(const A &&)': is not a special member function or comparison operator which can be defaulted
<source>(13): note: the argument must be a non-const rvalue reference

以及 Clang:

error: the parameter for an explicitly-defaulted move constructor may not be const

在线演示:https://gcc.godbolt.org/z/6W9W865vG

过去8年里,这方面有什么变化吗?现在哪种实现方式是正确的?

c++
  • 1 个回答
  • 113 Views
Martin Hope
Fedor
Asked: 2025-04-25 03:43:56 +0800 CST

为什么可以使用非 const 左值参数来复制向量的元素?

  • 8

如果将一个复制std::vector到另一个,或者将 a 的元素复制std::vector到较大(reserve)或较小(shrink_to_fit)的堆内存块中,则调用元素类型的哪个构造函数?

在示例程序中:

#include <vector>
#include <iostream>

struct A {
    A() {}
    A(A&) { std::cout << "A(A&) "; }
    A(const A&) { std::cout << "A(const A&) "; }
};

int main() {
    std::vector<A> v(1);
    v.reserve(10);
    auto w = v;
    v.shrink_to_fit();
}

我期望看到A(const A&) A(const A&) A(const A&)输出。但实际上,标准库的实现有所不同:

  • libc++印刷A(const A&) A(A&) A(const A&),
  • libstdc++印刷A(const A&) A(const A&) A(A&),
  • 和 Microsoft STL 打印A(A&) A(A&) A(A&)。

在线演示:https://gcc.godbolt.org/z/TTqxv9sd3

是否可以假设如果const调用非左值的构造函数,则允许用户代码修改其参数(至少是暂时的)?

c++
  • 1 个回答
  • 92 Views
Martin Hope
Fedor
Asked: 2025-04-15 01:01:44 +0800 CST

构造函数的成员初始化程序可以包含另一个成员的初始化吗?

  • 21

写这样的内容合法吗?

#include <memory>

struct A {
    int i, j;
    constexpr A() : i((std::construct_at(&j, 2), j-1)) {}
};
constexpr A a{};
static_assert(a.i == 1);
static_assert(a.j == 2);

这里,i-member 初始化器首先j使用 初始化成员std::construct_at,然后在 中读取其值j-1。

实践中我发现 GCC、MSVC 和 Clang 都能接受这个程序。在线演示:https://gcc.godbolt.org/z/YzEoPPj96

但 Clang 发出警告:

<source>:5:50: warning: field 'j' is uninitialized when used here [-Wuninitialized]
    5 |     constexpr A() : i((std::construct_at(&j, 2), j-1)) {}
      |                                                  ^

这看起来自相矛盾,因为读取常量表达式中未初始化的值必然会导致硬失败。程序是否格式正确,只是诊断错误?


感谢@TedLyngmo,这里有一个更复杂的堆分配示例:

#include <string>

struct A {
    std::string i, j;

    constexpr A()
        : i(((void)std::construct_at(&j,
                                     "Hello world, this is very funny indeed "
                                     "and this is a long string"),
             j + " with some exta in it"))
        , j([k=std::move(j)]()mutable { return std::move(k); }()) {}
};

static_assert( A{}.i.length() == 85 );
static_assert( A{}.j.length() == 64 );

在线演示:https://gcc.godbolt.org/z/zcb4hbhY3

c++
  • 1 个回答
  • 582 Views
Martin Hope
Fedor
Asked: 2025-04-03 04:45:59 +0800 CST

静态常量的初始化可以通过“case”标签跳过吗?

  • 9

case我在我的一个语句中声明了一个常量switch:

void foo( int& v ) {
    switch( v ) {
    case 0:
        static constexpr int c{ 0 };
        break; 
    case 1:
        v = c;
        break;
    }
}

在 GCC、Clang 和 EDG 中一切都运行良好。但如果我在 Visual Studio 中编译该程序,它会报错

错误 C2360:'case' 标签跳过了 'c' 的初始化

在线演示:https://gcc.godbolt.org/z/jTdnhfzoo

可以跳过常量的初始化,这样对吗c?程序真的不规范吗?还是必须接受?

c++
  • 1 个回答
  • 182 Views
Martin Hope
Fedor
Asked: 2025-03-28 20:36:32 +0800 CST

std::bit_cast 是否可以转换为 std::nullptr_t 类型或从 std::nullptr_t 类型转换?

  • 10

是否禁止使用std::bit_cast来转换为 或从std::nullptr_t = decltype(nullptr)类型转换?如果允许,1) 的结果必须std::bit_cast与 相同static_cast,2) 来回转换必须返回原始值吗?

我已经测试了当前的编译器,它们都接受以下程序而没有任何警告:

#include <bit>
#include <iostream>

int p = 0;
auto n = std::bit_cast<decltype(nullptr)>( &p );

int main() {
  std::cout 
    << (std::bit_cast<int*>(n) == static_cast<int*>(n))
    << ' '
    << (&p == std::bit_cast<int*>(n));
}

但是编译器对强制类型转换的处理方式存在分歧,这从程序的输出中可以看出:

  • 铿锵打印0 1。
  • GCC 打印1 0。
  • MSVC 打印1 1。

在线演示:https://gcc.godbolt.org/z/fbEGvGs4v

如果有的话,哪种实现是正确的?

c++
  • 1 个回答
  • 102 Views
Martin Hope
Fedor
Asked: 2025-02-08 05:17:43 +0800 CST

使用 std::ranges 计算可选数组中当前值的数量

  • 15

我的同事在 macOS 上移植了一个带有范围的 C++ 程序,并发现了一个意外的编译错误。

经过最大程度的简化,示例程序如下所示:

#include <optional>
#include <algorithm>

int main() {
    std::optional<int> ops[4];
    //...
    return (int)std::ranges::count_if( ops, &std::optional<int>::has_value );
};

GCC 和 MSVC 可以顺利运行该程序,但是 Clang 会显示一个长错误:

 error: no matching function for call to object of type 'const __count_if::__fn'
    7 |     return (int)std::ranges::count_if( ops, &std::optional<int>::has_value );
      |                 ^~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/clang-19.1.0/bin/../include/c++/v1/__algorithm/ranges_count_if.h:62:3: note: candidate template ignored: constraints not satisfied [with _Range = std::optional<int> (&)[4], _Proj = identity, _Predicate = bool (std::__optional_storage_base<int>::*)() const noexcept]
   62 |   operator()(_Range&& __r, _Predicate __pred, _Proj __proj = {}) const {
      |   ^
/opt/compiler-explorer/clang-19.1.0/bin/../include/c++/v1/__algorithm/ranges_count_if.h:60:13: note: because 'indirect_unary_predicate<_Bool (std::__optional_storage_base<int>::*)() const noexcept, projected<iterator_t<optional<int> (&)[4]>, identity> >' evaluated to false
   60 |             indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Predicate>
      |             ^
/opt/compiler-explorer/clang-19.1.0/bin/../include/c++/v1/__iterator/concepts.h:191:60: note: because 'predicate<_Bool (std::__optional_storage_base<int>::*&)() const noexcept, iter_value_t<__type> &>' evaluated to false
  191 |     indirectly_readable<_It> && copy_constructible<_Fp> && predicate<_Fp&, iter_value_t<_It>&> &&
      |                                                            ^
/opt/compiler-explorer/clang-19.1.0/bin/../include/c++/v1/__concepts/predicate.h:28:21: note: because 'regular_invocable<_Bool (std::__optional_storage_base<int>::*&)() const noexcept, std::optional<int> &>' evaluated to false
   28 | concept predicate = regular_invocable<_Fn, _Args...> && __boolean_testable<invoke_result_t<_Fn, _Args...>>;
      |                     ^
/opt/compiler-explorer/clang-19.1.0/bin/../include/c++/v1/__concepts/invocable.h:34:29: note: because 'invocable<_Bool (std::__optional_storage_base<int>::*&)() const noexcept, std::optional<int> &>' evaluated to false
   34 | concept regular_invocable = invocable<_Fn, _Args...>;
      |                             ^
/opt/compiler-explorer/clang-19.1.0/bin/../include/c++/v1/__concepts/invocable.h:28:3: note: because 'std::invoke(std::forward<_Fn>(__fn), std::forward<_Args>(__args)...)' would be invalid: no matching function for call to 'invoke'
   28 |   std::invoke(std::forward<_Fn>(__fn), std::forward<_Args>(__args)...); // not required to be equality preserving
      |   ^
/opt/compiler-explorer/clang-19.1.0/bin/../include/c++/v1/__algorithm/ranges_count_if.h:54:3: note: candidate function template not viable: requires at least 3 arguments, but 2 were provided
   54 |   operator()(_Iter __first, _Sent __last, _Predicate __pred, _Proj __proj = {}) const {
      |   ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

在线演示:https ://gcc.godbolt.org/z/no55zPzGz

我不明白这个程序有什么问题?

c++
  • 1 个回答
  • 233 Views
Martin Hope
Fedor
Asked: 2025-01-13 04:11:26 +0800 CST

局部范围常量作为函数的默认参数

  • 10

函数作用域内的函数声明是否可以将本地定义的常量作为默认参数?

例如,

void f(int) {}

int main() {
    constexpr int c = 1;
    void f(int = c);
    f();
}

GCC 不喜欢它,并说

错误:局部变量‘c’不得出现在此上下文中

MSVC 的行为类似:

错误 C2587:‘c’:非法使用局部变量作为默认参数

但 Clang 可以很好地接受它。在线演示:https://gcc.godbolt.org/z/9vWoK6TEz

这里哪种实现是正确的?

c++
  • 1 个回答
  • 125 Views
Martin Hope
Fedor
Asked: 2025-01-01 00:42:02 +0800 CST

AppleClang 15:‘std::atomic<float>’中没有名为‘fetch_add’的成员

  • 6

我有一个 C++20 程序,可以在 Ubuntu 20 中使用 GCC 10 或在 Visual Studio 2019 中成功构建。现在我需要为 macOS 13.7.2 x64(当前可在GitHub 托管的运行器上获得)编译它,它拥有 AppleClang 15 编译器。

该程序使用std::atomic<float>数据类型及其fetch_add操作如例所示:

#include <atomic>

int main() {
    std::atomic<float> a{0};
    a.fetch_add(1);
}

不幸的是,它无法在 AppleClang 15 中编译

错误:'std::atomic' 中没有名为 'fetch_add' 的成员

在线演示:https ://gcc.godbolt.org/z/8WvGrczq7

我想保留std::atomic<float>程序中的数据类型(以尽量减少更改),但fetch_add用其他可用的东西替换(可能性能较差)。 有没有针对旧 Clangs 的此类解决方法libc++?

c++
  • 2 个回答
  • 88 Views
Martin Hope
Fedor
Asked: 2024-12-22 05:32:10 +0800 CST

复制虚拟基类导致丢失 shared_ptr 所拥有的对象

  • 12

一位同事向我展示了这个程序:

#include <iostream>
#include <memory>

struct A {
    std::shared_ptr<int> u{ new int };
};

struct B : virtual A {};
struct C : virtual A {};
struct D : B, C {};

int main() {
    D d;
    d = D( d );
    std::cout << d.u;
}

尽管初始化shared_ptr为new int打印零。在线演示:https ://gcc.godbolt.org/z/n3Kxbc3Pf

我发现它有某种与菱形继承和公共虚拟基类相关的东西。

该程序是否存在任何未定义的行为,或者该程序格式正确并且标准要求在此处打印零?

c++
  • 1 个回答
  • 119 Views
Martin Hope
Fedor
Asked: 2024-11-17 05:06:26 +0800 CST

使用 std::construct_at 复制来更改联合中的活动成员

  • 7

可以通过复制前一个活跃成员的值来更改联合中的活跃成员吗std::construct_at?

这个最小的例子

#include <memory>

constexpr int f() {
    union U {
        char x{0};
        int y;
    } u;
    std::construct_at(&u.y, u.x);
    return u.y;
}

static_assert( f() == 0 );

被 GCC 和 MSVC 接受,但 Clang 拒绝它并出现错误:

/opt/compiler-explorer/clang-19.1.0/bin/../include/c++/v1/__memory/construct_at.h:41:50: 
note: read of member 'x' of union with active member 'y' is not allowed in a constant expression
   41 |   return ::new (std::__voidify(*__location)) _Tp(std::forward<_Args>(__args)...);

在线演示:https://gcc.godbolt.org/z/xrj57jroj

这里哪种实现是正确的?

c++
  • 1 个回答
  • 45 Views
Martin Hope
Fedor
Asked: 2024-11-04 03:39:35 +0800 CST

结构化绑定声明不能是“constinit”

  • 7

constinit从 C++20 开始可以使用说明符声明结构化绑定吗?

例如

struct A { int i, j; };

constinit auto [x, y] = A{ 0, 1 };

编译器在这方面有些分歧。MSVC 抱怨:

错误 C3694:结构化绑定声明不能包含除“static”、“thread_local”、“auto”和 cv-qualifiers 之外的其他说明符

Clang 紧随其后

错误:分解声明不能声明为“constinit”

但 GCC 只接受该示例。在线演示:https://gcc.godbolt.org/z/jaY7ncsPP

这里哪种实现是正确的?

c++
  • 1 个回答
  • 55 Views
Martin Hope
Fedor
Asked: 2024-09-23 04:06:10 +0800 CST

使用声明从基类模板引入依赖名称

  • 8

要在派生类模板中使用依赖基类中的名称(例如B<T>),必须向编译器添加一个前缀突出显示的依赖名称(B<T>::)。为了避免多次执行此操作,可以使用 using 声明。

下面的代码带有这样的使用声明:

template <class T>
struct A {
    constexpr static int x = 0;
};

template <class T>
struct B : A<T> {
    // ok everywhere
    constexpr static int y = B<T>::x;

    // ok in MSVC
    using B<T>::x;
    constexpr static int z = x;
};

在 MSVC 编译器中运行良好,但其他人不喜欢它。Clang 尤其抱怨

错误:'B' 中没有名为 'x' 的成员

y = B<T>::x但是 Clang 在上面一行中没有看到任何错误。在线演示: https ://gcc.godbolt.org/z/PvKW753M8

这里哪种实现是正确的以及为什么?

c++
  • 1 个回答
  • 93 Views
Martin Hope
Fedor
Asked: 2024-09-10 03:59:28 +0800 CST

Visual C++ 中的参数相关查找[重复]

  • 7
此问题这里已有答案:
使用模板的 C++ 代码无法在 c++ 20 中编译,但在 c++ 17 中可以编译 (1 个答案)
MSVC 无法推断模板参数 (2 个答案)
Microsoft C/C++:关于实现的“严格一致性”的定义是什么? (2 个答案)
为什么 /Zc:twoPhase- 编译器开关在 MSVC 中不起作用? (1 个回答)
昨天休息。

我的程序在 Visual Studio 的 C++20 模式下表现符合预期,但我需要让它在 C++17 模式下运行,在该模式下程序会改变其输出。

最小化后,它看起来如下:

template <typename T>
int f() { return g(T{}); }

namespace {
    struct A{
        friend int g(const A &) { return 1; }
    };
}

template <typename T>
int g(T&&) { return 2; }

int main() { return f<A>(); }

在 C++20 模式下输出为main(),1而在 C++17 模式下输出为2。在线演示: https: //gcc.godbolt.org/z/h8b8qoGGj

我想知道 C++20 的哪个新特性(C++17 中没有)导致了结果的差异。

c++
  • 1 个回答
  • 90 Views
Martin Hope
Fedor
Asked: 2024-08-27 04:39:22 +0800 CST

具有非类类型的显式对象参数的比较运算符

  • 9

C++23 中类的比较运算符是否可以具有与类类型不同的类型的显式对象参数?

例如

struct A {
    int i;
    constexpr bool operator==(this int x, int y) { return x == y; }
    constexpr operator int() const { return i; }
};

现在比较不平等

static_assert( A{0} != A{1} );

被 GCC 和 Clang 接受,但 MSVC 抱怨:

error C2803: 'operator ==' must have at least one formal parameter of class type
error C2333: 'A::operator ==': error in function declaration; skipping function body

平等的比较

static_assert( A{2} == A{2} );

仅被 GCC 接受,而 Clang 已经不喜欢它了:

error: use of overloaded operator '==' is ambiguous (with operand types 'A' and 'A')
   11 | static_assert( A{2} == A{2} );
note: candidate function
    3 |     constexpr bool operator==(this int x, int y) { return x == y; }
note: built-in candidate operator==(int, int)

在线演示:https://gcc.godbolt.org/z/dnKc1fhcT

这里哪个编译器是正确的?

c++
  • 1 个回答
  • 83 Views
Martin Hope
Fedor
Asked: 2024-08-01 02:47:39 +0800 CST

对象的状态在构造之后和成员函数调用之前发生变化

  • 8

下面的程序已尽可能地缩减,以显示 Visual Studio C++ 编译器遇到的问题。

f是接受输入谓词对象的某个算法函数P p,它具有用户定义的复制构造函数,用于记住源对象上的指针。在该构造函数中,检查源对象和复制对象是否确实不同,if (s == this) throw 0;但在operator ()同一次检查中返回相反的结果:

struct P {
    const P * s = nullptr;
    constexpr P() {}
    constexpr P(const P & p) : s(&p) {
        if (s == this) throw 0; // never happens
    }
    constexpr bool operator()() const {
        return s != this; // shall be always true?
    }
};

constexpr bool f(P p) {
    return p.s ? p() : f(p);
}

int main() {
    static_assert( f(P{}) ); // fails in MSVC, where static_assert( f(P{}) == false );
}

在线演示:https://gcc.godbolt.org/z/nqYoshExj

如何解释同样的检查在对象的构造函数中通过,但在其方法中却失败了?

c++
  • 1 个回答
  • 93 Views
Martin Hope
Fedor
Asked: 2024-07-27 02:30:21 +0800 CST

递归 lambda 表达式中斐波那契数列的编译时计算不准确

  • 10

下面是一个递归 lambda 表达式,它可以在运行时和常量求值期间计算斐波那契数列的值:

auto fib = [](this auto && f, auto && p) {
    if ( p < 3 ) return 1;
    decltype(+p) v{};
    v = p - 2;
    return f(v+1) + f(v);
};

// ok everywhere
static_assert( fib(1) == 1 );
static_assert( fib(2) == 1 );
static_assert( fib(3) == 2 );
static_assert( fib(4) == 3 );
static_assert( fib(5) == 5 );
static_assert( fib(6) == 8 );
static_assert( fib(7) == 13 );
static_assert( 20 <= fib(8) && fib(8) <= 21 );
// fails in MSVC
static_assert( fib(8) == 21 );

据我所知,它在 GCC 和 Clang 中运行良好,但在 Visual Studio 中,它只适用于前 7 个元素,并且fib(8)计算不准确,导致静态断言失败。在线演示:https://gcc.godbolt.org/z/dMM6f16do

如果程序正确,为什么它对于小数表现良好,而对于大数却不行(例如整数溢出,递归调用太多)?

c++
  • 1 个回答
  • 79 Views
Martin Hope
Fedor
Asked: 2024-07-25 17:29:28 +0800 CST

为什么 operator() 在 Clang 中复制可移动临时变量?

  • 8

在以下 C++23 程序中

struct A {
    A() {}
    A(A&&) = default;
    void f(this A) {}
    void operator() (this A) {}
};

int main() {
    A{}.f(); // ok
    A{}();   // Clang error
}

struct A是可移动的,并且其成员函数f()和operator()具有显式的对象参数(this A)。

在 Clang 中,编译器令人惊讶A{}.f()地工作正常,但A{}()失败并出现错误:

<source>:10:5: error: call to implicitly-deleted copy constructor of 'A'
<source>:3:5: note: copy constructor is implicitly deleted because 'A' has a user-declared move constructor

在线演示:https://gcc.godbolt.org/z/hbfzMvE9f

f()从语言的角度来看,函数之间是否存在一些差异operator(),可以解释编译器对它们的可观察处理?

c++
  • 1 个回答
  • 90 Views
Martin Hope
Fedor
Asked: 2024-07-24 03:07:41 +0800 CST

显式对象成员函数中的移动省略

  • 8

如果调用临时对象的显式对象成员函数,是否必须在显式对象参数中省略临时对象的移动?

考虑以下示例,其中struct A移动构造函数已被删除并且f(this A)为临时对象调用A:

struct A {
    A() {}
    A(A&&) = delete;
    void f(this A) {}
};

int main() {
    A{}.f();
}

该程序在 GCC 中被接受,但是 Clang 和 MSVC 都拒绝它:

调用已删除的“A”构造函数

错误 C2280:'A::A(A &&)':尝试引用已删除的函数

在线演示:https://gcc.godbolt.org/z/rbv14cnz5

这里哪个编译器是正确的?

c++
  • 2 个回答
  • 76 Views
Martin Hope
Fedor
Asked: 2023-08-20 05:09:04 +0800 CST

可以为局部类定义友元比较运算符吗?

  • 8

从 C++20 开始,编译器可以为类生成默认比较运算符,包括作为友元非成员函数,请参阅cppreference.com中的 (2) 。

我遇到了在 MSVC 中工作的代码,它为函数内的本地类执行此操作:

void foo() {
    struct A;
    bool operator ==(const A&, const A&);
    struct A { 
        friend bool operator ==(const A&, const A&) = default;
    };
}

不幸的是,它在 Clang 或 GCC 中不起作用,它们抱怨:

error: cannot define friend function 'operator==' in a local class definition

在线演示: https: //godbolt.org/z/Ts1fer1d1

有一种方法可以让代码被GCC接受:

void foo() {
    struct A;
    bool operator ==(const A&, const A&);
    struct A { 
        friend bool operator ==(const A&, const A&);
    };
    bool operator ==(const A&, const A&) = default;
}

现在只打印一些模糊的警告:

warning: declaration of 'bool operator==(const foo()::A&, const foo()::A&)' has 'extern' and is initialized

但另外两个编译器不喜欢,在线演示:https://godbolt.org/z/he1zjj46G

只要编译器存在分歧,上面两个示例中哪一个是正确的?

c++
  • 1 个回答
  • 63 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    重新格式化数字,在固定位置插入分隔符

    • 6 个回答
  • Marko Smith

    为什么 C++20 概念会导致循环约束错误,而老式的 SFINAE 不会?

    • 2 个回答
  • Marko Smith

    VScode 自动卸载扩展的问题(Material 主题)

    • 2 个回答
  • Marko Smith

    Vue 3:创建时出错“预期标识符但发现‘导入’”[重复]

    • 1 个回答
  • Marko Smith

    具有指定基础类型但没有枚举器的“枚举类”的用途是什么?

    • 1 个回答
  • Marko Smith

    如何修复未手动导入的模块的 MODULE_NOT_FOUND 错误?

    • 6 个回答
  • Marko Smith

    `(表达式,左值) = 右值` 在 C 或 C++ 中是有效的赋值吗?为什么有些编译器会接受/拒绝它?

    • 3 个回答
  • Marko Smith

    在 C++ 中,一个不执行任何操作的空程序需要 204KB 的堆,但在 C 中则不需要

    • 1 个回答
  • Marko Smith

    PowerBI 目前与 BigQuery 不兼容:Simba 驱动程序与 Windows 更新有关

    • 2 个回答
  • Marko Smith

    AdMob:MobileAds.initialize() - 对于某些设备,“java.lang.Integer 无法转换为 java.lang.String”

    • 1 个回答
  • Martin Hope
    Fantastic Mr Fox msvc std::vector 实现中仅不接受可复制类型 2025-04-23 06:40:49 +0800 CST
  • Martin Hope
    Howard Hinnant 使用 chrono 查找下一个工作日 2025-04-21 08:30:25 +0800 CST
  • Martin Hope
    Fedor 构造函数的成员初始化程序可以包含另一个成员的初始化吗? 2025-04-15 01:01:44 +0800 CST
  • Martin Hope
    Petr Filipský 为什么 C++20 概念会导致循环约束错误,而老式的 SFINAE 不会? 2025-03-23 21:39:40 +0800 CST
  • Martin Hope
    Catskul C++20 是否进行了更改,允许从已知绑定数组“type(&)[N]”转换为未知绑定数组“type(&)[]”? 2025-03-04 06:57:53 +0800 CST
  • Martin Hope
    Stefan Pochmann 为什么 {2,3,10} 和 {x,3,10} (x=2) 的顺序不同? 2025-01-13 23:24:07 +0800 CST
  • Martin Hope
    Chad Feller 在 5.2 版中,bash 条件语句中的 [[ .. ]] 中的分号现在是可选的吗? 2024-10-21 05:50:33 +0800 CST
  • Martin Hope
    Wrench 为什么双破折号 (--) 会导致此 MariaDB 子句评估为 true? 2024-05-05 13:37:20 +0800 CST
  • Martin Hope
    Waket Zheng 为什么 `dict(id=1, **{'id': 2})` 有时会引发 `KeyError: 'id'` 而不是 TypeError? 2024-05-04 14:19:19 +0800 CST
  • Martin Hope
    user924 AdMob:MobileAds.initialize() - 对于某些设备,“java.lang.Integer 无法转换为 java.lang.String” 2024-03-20 03:12:31 +0800 CST

热门标签

python javascript c++ c# java typescript sql reactjs html

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve