Last active
August 29, 2015 14:07
-
-
Save h-sao/6a9c07d160b77e67ad92 to your computer and use it in GitHub Desktop.
This file contains 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
// P.264 15.2.3章 add const例 | |
template<template T> | |
struct addconst{ | |
typedef T const type; | |
}; | |
// remove const例 | |
// 1 | |
template<template T> | |
struct remove_const{ | |
usin type = T; | |
}; | |
// 2 | |
template<template T> | |
struct remove_const< T const >{ // T constで特殊化 | |
usin type = T; | |
}; | |
remove_const<int const>::type // これは 2 にマッチする |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment