++
Assignee: unassigned at gcc dot gnu.org
Reporter: yangzhe1990 at gmail dot com
When compiling the following code
#include
struct A {
virtual void f() = 0;
};
struct B : public A {
virtual void f() {};
};
int main() {
std::unique_ptr p(new B());
A *q = NULL
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yangzhe1990 at gmail dot com
The correct code should be std::inner_product(x, x_end, y, 0.0), but with
-Wconversion enabled, there should be a float to int conversion warning
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57986
--- Comment #9 from yangzhe1990 at gmail dot com ---
> is probably including
Yes, you are right. is not including .
> Make the type non-copyable, and if you need to pass it around then use
> shared_ptr
Thanks. Anyway there seems no
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57986
--- Comment #7 from yangzhe1990 at gmail dot com ---
Thanks. Now only one question left. Why removing could disable the
ADL?
BTW, in c++03, to avoid the const_cast, is writing a shared_ptr the right
choice?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57986
--- Comment #3 from yangzhe1990 at gmail dot com ---
Created attachment 30554
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30554&action=edit
main program
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57986
--- Comment #2 from yangzhe1990 at gmail dot com ---
Created attachment 30553
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30553&action=edit
vector_iterator_asdf and computation functions
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57986
--- Comment #1 from yangzhe1990 at gmail dot com ---
Created attachment 30552
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30552&action=edit
thread
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yangzhe1990 at gmail dot com
Source codes are attached.
The compiling cmdline is:
g++ numeric_utils_test.cpp -std=c++11 -o numeric_utils_tes
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57925
--- Comment #2 from yangzhe1990 at gmail dot com ---
(In reply to Paolo Carlini from comment #1)
> Ok, but since you don't seem to have a Copyright assignment on file, we
> can't really use your code and we would have to, eg, ad
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yangzhe1990 at gmail dot com
Current implementation of discrete_distribution employs a strait-forward
algorithm by partial_sum and std::lower_bound, which is an O(log n) per sample
algorithm
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54907
--- Comment #2 from yangzhe1990 at gmail dot com 2012-10-12 11:20:39 UTC ---
No, p is not modified twice.
p is modified once,
*p is modified once.
(In reply to comment #1)
> Not a bug p is modified twice without a seqence point the result
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54907
Bug #: 54907
Summary: post increasing a value pointed by p in subexpression
of an expression modifying p saves the increased value
in the wrong place
Classification: Unclas
12 matches
Mail list logo