Jump to content

  • Log In with Google      Sign In   
  • Create Account


KidsLoveSatan

Member Since 12 Feb 2008
Online Last Active Today, 09:20 AM

Posts I've Made

In Topic: C++ template default parameter with enable_if

22 November 2013 - 02:43 AM

Never used enable_if before but according to http://en.cppreference.com/w/cpp/types/enable_if it should be

class Base

{};
 
class A

{

public:

    template <class T>

    typename std::enable_if<std::is_base_of<Base, T>::value>::type Test1()

    {}
 
    // C++14

    template <class T>

    std::enable_if_t<std::is_base_of<Base, T>::value> Test2()

    {}

};
 
int main()

{

    A a;

    a.Test1<Base>();

    return 0;

}


In Topic: Protodata—a language for binary data

11 February 2013 - 06:12 AM

Support for something like typedef, and perhaps structs.

 

typedef s32 int

int 1
int 2
int 3

struct something
{
  s16
  u32
  utf8
  u8 0
}

something { 0 1 "x" }

 

 


In Topic: Would you let a digital copy of yourself be made?

31 December 2012 - 05:55 AM

For experimental reason perhaps. Though I disagree about it being me, that would be like saying a canister of hydrogen is the very same atoms as in the sun. The difference is localization.

 

It might be immortal, I won't be.


In Topic: Suicide as a major subject in my games. What do you think?

27 August 2012 - 10:54 AM

Another game, Call of Cthulhu: Dark Corners of the Earth, the intro shows the main character committing suicide with the actual game showing what lead up to his insanity.

In Topic: Assigning lambdas

03 May 2012 - 02:36 AM

As others have pointed out, lambas are not an instance of std::function<>. Microsoft in this instance have done nothing wrong.

PARTNERS