Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

CubbiMew

@CubbiMew
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Is it possible to bind the "this" pointer
    C CubbiMew

    You could use bind1st if CallBackFunc took one parameter:

    void CallBackFunc(int) { ... }
    ...
    obj->SetCallback(std::bind1st(std::mem_fun(&MyClass::CallBackFunc), this));

    Since it takes nothing, you may have to write your own function template that takes a callable and a pointer that returns a small function object that stores the callable and the pointer as members and invokes them with operator(): as always, by refusing to use boost you're forcing yourself to reimplement parts of it.

    C / C++ / MFC c++ question

  • Eigen library : compile error
    C CubbiMew

    The code is correct C++, except that this header file will only compile if included after Core, as it is in Eigenvalues:

    #ifndef EIGEN_EIGENVALUES_MODULE_H
    #define EIGEN_EIGENVALUES_MODULE_H

    #include "Core"
    ...
    #include "src/Eigenvalues/HessenbergDecomposition.h"

    src/Eigenvalues/HessenbergDecomposition.h is not supposed to be included directly. What is the cpp file that you're trying to compile?

    C / C++ / MFC help c++ html tutorial question

  • Signed integers considered harmful?
    C CubbiMew

    Lots and lots of things in C++ (and C for that matter) can lead to undefined behavior if preconditions are not met. Signed integer arithmetic is just one of many. If you're programming in this language, you should be used to dealing with narrow contracts. So, no, they shouldn't be avoided. Deal with them depending on the situation, in many cases an assert will suffice. Pretending it's not a problem is fatal. (and no, gcc isn't the only compiler that assumes that naive signed overflow checks are always false)

    C / C++ / MFC help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups