You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2007/01/19 18:59:29 UTC

[jira] Assigned: (STDCXX-323) std::div(long, long) overload missing from

     [ https://issues.apache.org/jira/browse/STDCXX-323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor reassigned STDCXX-323:
-----------------------------------

    Assignee: Martin Sebor

> std::div(long, long) overload missing from <cstdlib>
> ----------------------------------------------------
>
>                 Key: STDCXX-323
>                 URL: https://issues.apache.org/jira/browse/STDCXX-323
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 26. Numerics
>    Affects Versions: 4.1.3, 4.1.2
>         Environment: all
>            Reporter: Martin Sebor
>         Assigned To: Martin Sebor
>
> The well-formed program below fails to compile with 4.1.2. According to c.math, p8, the C++ header <cstdlib> adds an overload of div(long, long) that returns ldiv_t to the C function div(int, int) that returns div_t. Looks like we're missing that overload.
> $ cat t.cpp && make t
> #include <cstdlib>
> int main ()
> {
>     std::ldiv_t x = std::div (1L, 1L);
> }
> eccp -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG    -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include -I/build/sebor/eccp-3.8-11s/include -I/build/sebor/dev/stdlib/include/ansi -I/build/sebor/PlumHall/lvs06a/conform -I/build/sebor/PlumHall/lvs06a/dst.3  -A -x --template_directory=/build/sebor/eccp-3.8-11s/lib -g  --display_error_number --remarks --diag_suppress 193,236,340,401,261,479,487,678,679,815 --diag_suppress 177,381,191,68,550,611,997,549   t.cpp
> "t.cpp", line 5: error #312: no suitable user-defined conversion from
>           "std::div_t" to "std::ldiv_t" exists
>       std::ldiv_t x = std::div (1L, 1L);
>                       ^
> 1 error detected in the compilation of "t.cpp".
> make: *** [t.o] Error 2

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira