lkml.org 
[lkml]   [2006]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Compiling C++ modules
    >
    > I think it's easy to show that the equivalent C++ code would be shorter,
    > faster, and safer.
    >
    I doubt that. Mixing C and C++ leads to C++ code being slightly bigger than
    intended. In C, you can have

    struct ops *p = void_ptr;

    In C++,

    struct ops *p = (struct ops *)void_ptr

    or even

    struct ops *p = static_cast<struct ops *>(void_ptr);

    And void*s are used a lot.


    Jan Engelhardt
    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-04-25 11:06    [W:2.190 / U:0.196 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site