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

Search:

Type: Posts; User: dude_1967

Page 1 of 63 1 2 3 4

Search: Search took 0.26 seconds.

  1. Re: Array of constant values as template parameter

    Oh yeah,

    And I also forgot to add that one of the real tricks is finding reliable ways to coerce the compiler into constant-folding the coefficients, not merely getting the math unrolled. This...
  2. Re: Array of constant values as template parameter

    Yes. I agree, I agree and I agree with all three sections of your text.

    And I really do like your C-style array suggestion. In fact, I'm just in the process of seeing how it is unrolled or even...
  3. Re: Array of constant values as template parameter

    With pointer : Yes and no.
    With std::array : Yes.

    I am simultaneously investigating compiler-time unrolling in combination with compiler-time constants. The constants in a const...
  4. Re: Array of constant values as template parameter

    No, that one did not work.

    But this cool tidbit works with GCC. I tested it with GCC 4.5.2



    #include <initializer_list>

    template<const unsigned order>
    struct orderN_math
  5. Array of constant values as template parameter

    Hello,

    It's been a while since I checked in here.

    Is it possible to use an array of constant values as a template parameter. I am writing preliminary benchmark code for ISO/IEC 14882:2011, so I...
  6. Re: Subtle differences in std::vector

    Thanks. All of this helped.

    Sincerely, Chris.
  7. Re: Subtle differences in std::vector

    I can understand that. In fact, for a day or so, I was content to just figure it along those lines.

    But is this really an implementation detail? What if someone wanted to use some ctor/dtor...
  8. [RESOLVED] Subtle differences in std::vector

    Hello,

    I am studying subtle differences in the implementation of std::vector<T> for Microsoft and GCC compilers.

    The program shown below gives different output for the two compilers. You need...
  9. Replies
    2
    Views
    645

    Re: How to delete ptr from placement-new?

    Quicker than a blitz as usual, Paul.
    Thanks.
  10. Replies
    2
    Views
    645

    How to delete ptr from placement-new?

    Hi Gurus,

    I know, I must be a dork for not knowing it. But how do you delete a pointer created with placement-new? I'm trying to get with the sample below and I keep thinking that there should be...
  11. Replies
    20
    Views
    3,123

    Re: Tasteless mimic of operator new: Call ctor

    Thanks for the further suggestions.

    The types I am creating with placement new never delete. They also don't alocate any further resources internally.

    It's kind of a funny region --- the world...
  12. Replies
    2
    Views
    889

    Re: C++ Evolution Clarity

    Thanks. Chris.
  13. Replies
    20
    Views
    3,123

    Re: Tasteless mimic of operator new: Call ctor

    Lindley, I can't add to your rep any more because the box won't let me. Wants me to spread it around.

    But you rock. All the other gurus too.

    Bye, Chris.
  14. Replies
    20
    Views
    3,123

    Re: Tasteless mimic of operator new: Call ctor

    Oh. I have heard of those, variadic templates. They came up in a previous post.

    Maybe I'll go into the intricate depths of the templates and try it again.

    Maybe I can make it prettier the next...
  15. Replies
    20
    Views
    3,123

    Re: Tasteless mimic of operator new: Call ctor

    Yes, what an astute observation. Thank you.

    I tried it that way a few times, but lost confidence because of the complexity of the solution details.

    At first, I actually did make a global...
  16. Replies
    20
    Views
    3,123

    Re: Tasteless mimic of operator new: Call ctor

    Right now my custom buffer returns zero if the call to placement new exceeds the available memory in the buffer. Perhaps I should add to my custom buffer a public member which can be queried...
  17. Replies
    20
    Views
    3,123

    Re: Tasteless mimic of operator new: Call ctor

    May I clarify my question now that I have worked on this a while?

    If my custom buffer returns (void*) 0u, will placement new correspondingly return 0?

    For a bit of background: I am working on...
  18. Replies
    2
    Views
    889

    C++ Evolution Clarity

    Hello Gurus,

    Could you please clarify some technical isses regarding C++ evolution?

    Background::thumb:

    There is ISO/IEC 14882:2003, also known as C++ 2003.
    There is also ISO/IEC...
  19. Replies
    20
    Views
    3,123

    Re: Tasteless mimic of operator new: Call ctor

    So just one more thing...

    Can I coerce placement new to return 0 if my custom buffer is full?

    If so, how?

    Sincerely, Chris.
  20. Replies
    20
    Views
    3,123

    Re: Tasteless mimic of operator new: Call ctor

    Oh... Silly me! You guys mean it's already there.

    I got it.

    Please disregard my last post.

    Thanks so much.

    Sincerely, Chris.
  21. Replies
    20
    Views
    3,123

    Re: Tasteless mimic of operator new: Call ctor

    Yes, thank you.

    [Edited]: Disregard previous text.
  22. Replies
    20
    Views
    3,123

    Tasteless mimic of operator new: Call ctor

    Hello Gurus,

    I'm working on a few generic code sequences which should in some ways mimic the functionality of global operator new. I believe the code might be considered in bad taste. However, I...
  23. Replies
    2
    Views
    1,044

    Re: Explicit Template Confusion

    Thanks superbonzo.

    I have used your suggestion, adapted to the application.
    The language issues are working out!
    The application still has a problem, but that is an unrelated issue.

    Always a...
  24. Replies
    2
    Views
    1,044

    Explicit Template Confusion

    Hi Gurus,

    Howdy, I've been gone a while.

    I would like to make specializations of a template subroutine within the specialization of a template struct.


    I know that the standard does not...
  25. Re: Variable Template Params On Function in Template Class

    Makes sense. Thanks.

    Best Regards, Chris
Results 1 to 25 of 1564
Page 1 of 63 1 2 3 4





Click Here to Expand Forum to Full Width

Featured