CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Lindley

Page 1 of 80 1 2 3 4

Search: Search took 0.19 seconds; generated 22 minute(s) ago.

  1. Android, native shared libraries, and symbol stripping

    When you build and Android app, it can consist of some combination of Java code and native code connected via JNI. The native code is represented as a .so (shared library) with the Android .apk file....
  2. Replies
    2
    Views
    3,691

    WSAStartup best practices?

    I'm writing a network-related module for a larger project. It's cross-platform, and the Windows implementation uses Winsock2.

    I'm having some trouble figuring out the best way to handle the need...
  3. Replies
    3
    Views
    1,933

    Re: Nonblocking connect and select() for writing

    On a related note, would select() ever indicate that a socket is *both* in the error set and another set? I can't find documentation either way, but that appears to be happening and I'm not sure how...
  4. Replies
    3
    Views
    1,933

    Nonblocking connect and select() for writing

    I'm trying to test a class that checks sockets for writability. Most of the time sockets should always be writable unless their buffers are full, but it's my understanding that polling for...
  5. Replies
    8
    Views
    3,030

    Re: Program-unique values

    UUIDs would be great, except that I don't think there's an easy way to generate them at compile time......

    Another approach is to declare a function-local type everywhere I want a static, and use...
  6. Replies
    8
    Views
    3,030

    Re: Program-unique values

    That's an interesting idea, but I'm not convinced it will work....if two files start with the same letter but have different second letters, then (assuming identical lines) you'd end up with the same...
  7. Replies
    8
    Views
    3,030

    Program-unique values

    I'm looking for a way to generate a program-wide unique value to use as a template parameter. Generating a unique value within a translation unit is pretty easy with __LINE__, but that doesn't ensure...
  8. Replies
    1
    Views
    4,922

    Get libstdc++ version from the preprocessor?

    I have a bit of logic that needs to work in a variety of environments. In particular, though, it seems that the libstdc++ that shipped with gcc 4.4.3 has has_trivial_assign, while later versions...
  9. Replies
    3
    Views
    8,325

    Re: extern templates

    Oh, and the strange thing is that if I look up C2960, I get an unrelated error from VS6. There doesn't appear to be any documentation of this error message.
  10. Replies
    3
    Views
    8,325

    extern templates

    I am trying to use extern templates in VS 2010.

    In most cases, people use extern templates purely as an optimization, but in my case I actually need them for correctness; in the header, the type...
  11. Replies
    3
    Views
    3,926

    Re: Pass value from one function to another

    Note that <string> and <cstring> are not the same.

    <cstring> is C++'s name for the old C <string.h>. It contains functions to operate on char*-style strings, like strcat, strcpy, etc.

    <string>...
  12. Replies
    1
    Views
    675

    Detect protected destructor?

    Is there a way to detect whether or not a template type has a protected destructor?

    I see there is std::is_destructible in C++11, but I can't tell if this will return true or false for the...
  13. Replies
    2
    Views
    3,986

    Re: Inheriting one variadic class from another

    I believe I've worked it out. I did need a helper class to do the majority of the logic and keep the extra type hidden from the main interface.
  14. Replies
    2
    Views
    3,986

    Re: Inheriting one variadic class from another

    I may have generalized my example code too much....in my case, the parameter pack is a list of values, not types. This is good in that it allows me to pass an additional type as the first argument,...
  15. Replies
    2
    Views
    3,986

    Inheriting one variadic class from another

    Let's say I have a variadic base class with a pure-virtual function per type:



    template <typename ... Types>
    class Base;

    template <typename T, typename ... Types>
    class Base<T,Types...>:...
  16. Replies
    2
    Views
    1,033

    Re: Variadic templates and type composition

    Thanks, that's exactly what I needed!
  17. Replies
    2
    Views
    1,033

    Variadic templates and type composition

    Here's an interesting question I encountered. This isn't critical, but it would be "cool" to know how to accomplish it....

    Let's say I have a variadic type A and a non-variadic type B:

    ...
  18. Replies
    4
    Views
    1,052

    Re: Pure virtuals and construction order

    I don't really like base_from_member much, although I can see how it could occasionally save the day. In this case, though, it's a matter of completely inverting the normal construction/destruction...
  19. Replies
    4
    Views
    1,052

    Pure virtuals and construction order

    I have an AbstractAgent base class that manages a background thread. The actual work done in the background thread is accomplished through a pure virtual function call.

    Here's the problem: because...
  20. Re: Templates, multiple inheritance, and ambiguous overloads

    I suspect I need to add these to Derived:


    using Consumer<A>::consume;
    using Consumer<B>::consume;


    After reviewing what I'm actually trying to do, though, I'm going to make Consumer a...
  21. Templates, multiple inheritance, and ambiguous overloads

    Let's say I have a templated base class:


    template <typename Input>
    class Consumer
    {
    public:
    void consume(Input input)
    {
    // do something
  22. Re: Termination of namespaces with a closing brace only ...

    That's just what the rule is, I've never thought too hard about it.

    I suppose one *could* argue that a namespace is merely a scope, and like all scopes it doesn't require a closing semicolon,...
  23. Replies
    4
    Views
    2,197

    Re: Variadic templates and overload resolution

    the same thing that's going on here:


    So what you're saying is that during overload resolution, exact matches are preferred over template matches, but template matches are preferred over base...
  24. Replies
    4
    Views
    2,197

    Variadic templates and overload resolution

    I'm trying to learn how to use variadic templates, and I decided a great example would be serializing a series of types into a stringstream:



    // Send a fully constructed message.
    ...
  25. Replies
    6
    Views
    8,016

    Re: C Compiler for bare metal

    gcc will do what you need.

    I suggest you learn about virtualization environments such as qemu. They can greatly simplify the process of experimenting with OS-level functionality without...
Results 1 to 25 of 1999
Page 1 of 80 1 2 3 4





Click Here to Expand Forum to Full Width

Featured