Permalink
Browse files

c++17 change for emplace_back / emplace_front.

	modified:   src/cl-stl-deque.lisp
	modified:   src/cl-stl-forward-list.lisp
	modified:   src/cl-stl-list.lisp
	modified:   src/cl-stl-queue.lisp
	modified:   src/cl-stl-stack.lisp
	modified:   src/cl-stl-vector.lisp
  • Loading branch information...
show-matz committed Dec 31, 2018
1 parent 01d1794 commit 7d1c53aa6f166cec654b5acc766d562d65e6b003
Showing with 16 additions and 8 deletions.
  1. +4 −2 src/cl-stl-deque.lisp
  2. +2 −1 src/cl-stl-forward-list.lisp
  3. +4 −2 src/cl-stl-list.lisp
  4. +2 −1 src/cl-stl-queue.lisp
  5. +2 −1 src/cl-stl-stack.lisp
  6. +2 −1 src/cl-stl-vector.lisp
@@ -854,12 +854,14 @@
#-cl-stl-0x98 ; emplace_back
(defmethod-overload emplace_back ((container deque) new-val)
(__deq-push_back (__deq-ensure-core-exist container) new-val nil)
nil)
#+(or cl-stl-0x11 cl-stl-0x14) nil
#-(or cl-stl-0x11 cl-stl-0x14) new-val)

#-cl-stl-0x98 ; emplace_front
(defmethod-overload emplace_front ((container deque) new-val)
(__deq-push_front (__deq-ensure-core-exist container) new-val nil)
nil)
#+(or cl-stl-0x11 cl-stl-0x14) nil
#-(or cl-stl-0x11 cl-stl-0x14) new-val)

#-cl-stl-0x98 ; shrink_to_fit
(defmethod shrink_to_fit ((cont deque))
@@ -384,7 +384,8 @@
(new-node (__slst-newnode new-val nil nil)))
(setf (cdr new-node) (cdr top-sentinel))
(setf (cdr top-sentinel) new-node))
nil)
#+(or cl-stl-0x11 cl-stl-0x14) nil
#-(or cl-stl-0x11 cl-stl-0x14) new-val)

#-cl-stl-0x98
(let ((eos (gensym "EOS")))
@@ -515,14 +515,16 @@
(__list-insert-node (list-last-sentinel container)
(__list-new-node new-val nil))
(incf (list-size-cache container))
nil)
#+(or cl-stl-0x11 cl-stl-0x14) nil
#-(or cl-stl-0x11 cl-stl-0x14) new-val)

#-cl-stl-0x98 ; emplace_front
(defmethod-overload emplace_front ((container stl:list) new-val)
(__list-insert-node (list-node-next (list-top-sentinel container))
(__list-new-node new-val nil))
(incf (list-size-cache container))
nil)
#+(or cl-stl-0x11 cl-stl-0x14) nil
#-(or cl-stl-0x11 cl-stl-0x14) new-val)

;; insert ( single element ) - returns iterator
(defmethod-overload insert ((cont stl:list)
@@ -119,7 +119,8 @@
#-cl-stl-0x98 ; emplace
(defmethod-overload emplace ((container queue) new-val)
(__emplace_back-2 (__que-container container) new-val)
nil)
#+(or cl-stl-0x11 cl-stl-0x14) nil
#-(or cl-stl-0x11 cl-stl-0x14) new-val)

#-cl-stl-0x98
(defmethod-overload swap ((cont1 queue) (cont2 queue))
@@ -110,7 +110,8 @@
#-cl-stl-0x98 ; emplace
(defmethod-overload emplace ((container stack) new-val)
(__emplace_back-2 (__stck-container container) new-val)
nil)
#+(or cl-stl-0x11 cl-stl-0x14) nil
#-(or cl-stl-0x11 cl-stl-0x14) new-val)

#-cl-stl-0x98
(defmethod-overload swap ((cont1 stack) (cont2 stack))
@@ -677,7 +677,8 @@
(defmethod-overload emplace_back ((container stl:vector) new-val)
(__vector-ensure-core-exist container)
(__vector-push_back (vector-core container) new-val nil)
nil)
#+(or cl-stl-0x11 cl-stl-0x14) nil
#-(or cl-stl-0x11 cl-stl-0x14) new-val)

#-cl-stl-0x98 ; shrink_to_fit
(defmethod shrink_to_fit ((cont stl:vector))

0 comments on commit 7d1c53a

Please sign in to comment.