This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "sign_cast.hpp" | |
int main() { | |
char* a = 0; | |
unsigned char* x = sign_cast<unsigned char*>(a); //ok | |
sign_cast<char*>(a); //ok | |
sign_cast<signed char*>(a); //ok | |
//sign_cast<wchar_t*>(a); //error | |
sign_cast<const char*>(a); //ok | |
sign_cast<char*const>(a); //ok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Please refer new C++14 static_if library | |
https://github.com/gununu/static_if |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Use, modification and distribution are subject to the Boost Software License, | |
Version 1.0. (http://www.boost.org/LICENSE_1_0.txt). | |
*/ | |
#ifndef GUNUNU_GIL_PREVIEW_HPP | |
#define GUNUNU_GIL_PREVIEW_HPP | |
#include <windows.h> | |
#pragma comment(lib, "user32") |