본문 바로가기 메뉴 바로가기

두찡의 일상

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

두찡의 일상

검색하기 폼
  • 분류 전체보기 (129)
    • 개발 (119)
      • 알고리즘 (6)
      • 일상 (50)
      • 병렬프로그래밍 (8)
      • 도트도전기 (12)
      • 코드로 알아보는 ARM 리눅스 커널 TIL (33)
      • arm64 linux 6 분석 (10)
    • 게임근황 (6)
    • 개발 외 일상 (2)
  • 방명록

const_cast (1)
c++ const_cast 가 필요한 이유

https://stackoverflow.com/questions/36092937/should-i-use-const-cast * (미리보기) 절대 이렇게 이용하면 안 된다 const bool do_it = true; bool *ptr = const_cast(&do_it); *ptr = false; // optimizer probably thinks this is always true if (do_it) initiate_nuclear_first_strike(); c++의 type casting에 대해 공부하던 도중 const, volatile 속성을 없애주는 const_cast에 대해 의문이 생겼다. 도대체 상수로 선언한 값을 왜 바꾸고 싶어 하는 걸까? const_casting에서는 non-const 변수..

개발/일상 2019. 10. 29. 19:31
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • 링크드인
  • 깃허브
TAG
  • 우리는 vr핏이라고 부릅니다
  • 에러 위치 찾기
  • Golang
  • vrpit
  • 면접
  • print shared_ptr class member variable
  • Obstacle Avoidance
  • Reciprocal n-body Collision Avoidance
  • set value
  • hole-punching
  • SuffixArray
  • it's called a vrpit
  • RVO
  • 카카오
  • chrome-extension
  • C++
  • vr핏
  • ad skip
  • cockroach db
  • boost
  • 클래스 맴버 변수 출력하기
  • 영상 픽셀화 하기
  • 잘못된 빨간줄
  • 봄날에 스케치
  • red underline
  • Quest2
  • 코어 남기기
  • Visual Studio
  • mysql
  • shared_from_this
more
«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바