+
+
+(defun |#?-reader| (stream subchar arg)
+ (declare (ignore subchar arg))
+ (let ((not-p (when (char= (peek-char nil stream) #\-)
+ (read-char stream)))
+ (conditional (read stream t nil t)))
+ (cond
+ (*read-suppress* (read stream t nil t))
+ ((not *read-eval*)
+ (error 'reader-error
+ :format-control "Attempt to read #? while *READ-EVAL* is bound to NIL."
+ :format-arguments nil :stream stream))
+ ((if not-p
+ (eval conditional)
+ (not (eval conditional)))
+ (let ((*read-suppress* t))
+ (read stream t nil t)))))
+ (values))
+
+(set-dispatch-macro-character #\# #\? #'|#?-reader|)
+
+
+#+sbcl
+(progn
+ (defun sbcl-version ()
+ (let* ((dot1 (position #\. (lisp-implementation-version)))
+ (dot2 (position #\. (lisp-implementation-version) :start (1+ dot1))))
+ (values
+ (parse-integer (lisp-implementation-version) :end dot1)
+ (parse-integer (lisp-implementation-version) :start (1+ dot1) :end dot2)
+ (parse-integer (lisp-implementation-version) :start (1+ dot2) :junk-allowed t))))
+ (defun sbcl>= (req-major req-minor req-micro)
+ (multiple-value-bind (major minor micro) (sbcl-version)
+ (or
+ (> major req-major)
+ (and (= major req-major) (> minor req-minor))
+ (and (= major req-major) (= minor req-minor) (>= micro req-micro))))))
+
+#-sbcl
+(defun sbcl>= (req-major req-minor req-micro)
+ (declare (ignore req-major req-minor req-micro))
+ nil)